diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2012-11-14 23:06:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-15 13:46:29 -0500 |
commit | fea379b2db31f5c44f2a24645de5ea29721f22aa (patch) | |
tree | 194f837b1dd1a297289e513c2a73bf7bbe760e76 /net/ipv4/ipip.c | |
parent | 702ed3c1a9dfe4dfe112f13542d0c9d689f5008b (diff) |
ipip: fix sparse warnings in ipip_netlink_parms()
This change fixes two sparse warnings triggered by casting the ip addresses
from netlink messages in an u32 instead of be32. This change corrects that
in order to resolve the sparse warnings.
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>
Diffstat (limited to 'net/ipv4/ipip.c')
-rw-r--r-- | net/ipv4/ipip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 64686e1f54d9..c26c1717c1db 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -864,10 +864,10 @@ static void ipip_netlink_parms(struct nlattr *data[], | |||
864 | parms->link = nla_get_u32(data[IFLA_IPTUN_LINK]); | 864 | parms->link = nla_get_u32(data[IFLA_IPTUN_LINK]); |
865 | 865 | ||
866 | if (data[IFLA_IPTUN_LOCAL]) | 866 | if (data[IFLA_IPTUN_LOCAL]) |
867 | parms->iph.saddr = nla_get_u32(data[IFLA_IPTUN_LOCAL]); | 867 | parms->iph.saddr = nla_get_be32(data[IFLA_IPTUN_LOCAL]); |
868 | 868 | ||
869 | if (data[IFLA_IPTUN_REMOTE]) | 869 | if (data[IFLA_IPTUN_REMOTE]) |
870 | parms->iph.daddr = nla_get_u32(data[IFLA_IPTUN_REMOTE]); | 870 | parms->iph.daddr = nla_get_be32(data[IFLA_IPTUN_REMOTE]); |
871 | 871 | ||
872 | if (data[IFLA_IPTUN_TTL]) { | 872 | if (data[IFLA_IPTUN_TTL]) { |
873 | parms->iph.ttl = nla_get_u8(data[IFLA_IPTUN_TTL]); | 873 | parms->iph.ttl = nla_get_u8(data[IFLA_IPTUN_TTL]); |