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
@@ -2436,8 +2436,8 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh)
|
||||
ip_hdr(skb)->protocol = IPPROTO_ICMP;
|
||||
skb_reserve(skb, MAX_HEADER + sizeof(struct iphdr));
|
||||
|
||||
src = tb[RTA_SRC] ? nla_get_be32(tb[RTA_SRC]) : 0;
|
||||
dst = tb[RTA_DST] ? nla_get_be32(tb[RTA_DST]) : 0;
|
||||
src = tb[RTA_SRC] ? nla_get_in_addr(tb[RTA_SRC]) : 0;
|
||||
dst = tb[RTA_DST] ? nla_get_in_addr(tb[RTA_DST]) : 0;
|
||||
iif = tb[RTA_IIF] ? nla_get_u32(tb[RTA_IIF]) : 0;
|
||||
mark = tb[RTA_MARK] ? nla_get_u32(tb[RTA_MARK]) : 0;
|
||||
|
||||
|
Reference in New Issue
Block a user