From fea379b2db31f5c44f2a24645de5ea29721f22aa Mon Sep 17 00:00:00 2001 From: Nicolas Dichtel Date: Thu, 15 Nov 2012 04:06:40 +0000 Subject: [PATCH] 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 Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller --- net/ipv4/ipip.c | 4 ++-- 1 file 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[], parms->link = nla_get_u32(data[IFLA_IPTUN_LINK]); if (data[IFLA_IPTUN_LOCAL]) - parms->iph.saddr = nla_get_u32(data[IFLA_IPTUN_LOCAL]); + parms->iph.saddr = nla_get_be32(data[IFLA_IPTUN_LOCAL]); if (data[IFLA_IPTUN_REMOTE]) - parms->iph.daddr = nla_get_u32(data[IFLA_IPTUN_REMOTE]); + parms->iph.daddr = nla_get_be32(data[IFLA_IPTUN_REMOTE]); if (data[IFLA_IPTUN_TTL]) { parms->iph.ttl = nla_get_u8(data[IFLA_IPTUN_TTL]); -- 2.20.1