[PATCH net-next] gre: use nla_get_be32() to extract flowinfo

Subsystems: networking [general], networking [ipv4/ipv6], the rest

STALE3669d

2 messages, 2 authors, 2016-09-25 · open the first message on its own page

[PATCH net-next] gre: use nla_get_be32() to extract flowinfo

From: Lance Richardson <hidden>
Date: 2016-09-24 18:01:06

Eliminate a sparse endianness mismatch warning, use nla_get_be32() to
extract a __be32 value instead of nla_get_u32().

Signed-off-by: Lance Richardson <redacted>
---
 net/ipv6/ip6_gre.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 397e1ed..4ce74f8 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1239,7 +1239,7 @@ static void ip6gre_netlink_parms(struct nlattr *data[],
 		parms->encap_limit = nla_get_u8(data[IFLA_GRE_ENCAP_LIMIT]);
 
 	if (data[IFLA_GRE_FLOWINFO])
-		parms->flowinfo = nla_get_u32(data[IFLA_GRE_FLOWINFO]);
+		parms->flowinfo = nla_get_be32(data[IFLA_GRE_FLOWINFO]);
 
 	if (data[IFLA_GRE_FLAGS])
 		parms->flags = nla_get_u32(data[IFLA_GRE_FLAGS]);
-- 
2.5.5

Re: [PATCH net-next] gre: use nla_get_be32() to extract flowinfo

From: David Miller <davem@davemloft.net>
Date: 2016-09-25 00:08:15

From: Lance Richardson <redacted>
Date: Sat, 24 Sep 2016 14:01:04 -0400
Eliminate a sparse endianness mismatch warning, use nla_get_be32() to
extract a __be32 value instead of nla_get_u32().

Signed-off-by: Lance Richardson <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help