ip6tnl: fix sparse warnings in ip6_tnl_netlink_parms()
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Thu, 15 Nov 2012 04:06:42 +0000 (04:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Nov 2012 18:46:29 +0000 (13:46 -0500)
This change fixes a sparse warning triggered by casting the flowinfo from
netlink messages in an u32 instead of be32. This change corrects that in order
to resolve the sparse warning.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_tunnel.c

index ab4d05633bfd64ec73c5482974bb800b6f55ae07..bf3a549267d322fde1ef1c35a671174f9b14d62d 100644 (file)
@@ -1568,7 +1568,7 @@ static void ip6_tnl_netlink_parms(struct nlattr *data[],
                parms->encap_limit = nla_get_u8(data[IFLA_IPTUN_ENCAP_LIMIT]);
 
        if (data[IFLA_IPTUN_FLOWINFO])
-               parms->flowinfo = nla_get_u32(data[IFLA_IPTUN_FLOWINFO]);
+               parms->flowinfo = nla_get_be32(data[IFLA_IPTUN_FLOWINFO]);
 
        if (data[IFLA_IPTUN_FLAGS])
                parms->flags = nla_get_u32(data[IFLA_IPTUN_FLAGS]);