gre: use nla_get_be32() to extract flowinfo
authorLance Richardson <lrichard@redhat.com>
Sat, 24 Sep 2016 18:01:04 +0000 (14:01 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 25 Sep 2016 00:07:44 +0000 (20:07 -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 <lrichard@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_gre.c

index 397e1ed..4ce74f8 100644 (file)
@@ -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]);