netlink: implement nla_get_in_addr and nla_get_in6_addr
Those are counterparts to nla_put_in_addr and nla_put_in6_addr. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
930345ea63
commit
67b61f6c13
@@ -325,10 +325,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_be32(data[IFLA_IPTUN_LOCAL]);
|
||||
parms->iph.saddr = nla_get_in_addr(data[IFLA_IPTUN_LOCAL]);
|
||||
|
||||
if (data[IFLA_IPTUN_REMOTE])
|
||||
parms->iph.daddr = nla_get_be32(data[IFLA_IPTUN_REMOTE]);
|
||||
parms->iph.daddr = nla_get_in_addr(data[IFLA_IPTUN_REMOTE]);
|
||||
|
||||
if (data[IFLA_IPTUN_TTL]) {
|
||||
parms->iph.ttl = nla_get_u8(data[IFLA_IPTUN_TTL]);
|
||||
|
Reference in New Issue
Block a user