diff options
author | Thomas Graf <tgraf@suug.ch> | 2006-08-15 03:30:25 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 17:54:48 -0400 |
commit | 2942e90050569525628a9f34e0daaa9b661b49cc (patch) | |
tree | fc6acc11514e64ff9efc31bdc1bb458232206642 /net/ipv4 | |
parent | f8d8fda54a1bfcf8cf829e44c494b2b4582819aa (diff) |
[RTNETLINK]: Use rtnl_unicast() for rtnetlink unicasts
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ipmr.c | 7 | ||||
-rw-r--r-- | net/ipv4/route.c | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 85893eef6b16..98f0aa0d4216 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -312,7 +312,8 @@ static void ipmr_destroy_unres(struct mfc_cache *c) | |||
312 | e = NLMSG_DATA(nlh); | 312 | e = NLMSG_DATA(nlh); |
313 | e->error = -ETIMEDOUT; | 313 | e->error = -ETIMEDOUT; |
314 | memset(&e->msg, 0, sizeof(e->msg)); | 314 | memset(&e->msg, 0, sizeof(e->msg)); |
315 | netlink_unicast(rtnl, skb, NETLINK_CB(skb).dst_pid, MSG_DONTWAIT); | 315 | |
316 | rtnl_unicast(skb, NETLINK_CB(skb).pid); | ||
316 | } else | 317 | } else |
317 | kfree_skb(skb); | 318 | kfree_skb(skb); |
318 | } | 319 | } |
@@ -512,7 +513,6 @@ static void ipmr_cache_resolve(struct mfc_cache *uc, struct mfc_cache *c) | |||
512 | 513 | ||
513 | while((skb=__skb_dequeue(&uc->mfc_un.unres.unresolved))) { | 514 | while((skb=__skb_dequeue(&uc->mfc_un.unres.unresolved))) { |
514 | if (skb->nh.iph->version == 0) { | 515 | if (skb->nh.iph->version == 0) { |
515 | int err; | ||
516 | struct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct iphdr)); | 516 | struct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct iphdr)); |
517 | 517 | ||
518 | if (ipmr_fill_mroute(skb, c, NLMSG_DATA(nlh)) > 0) { | 518 | if (ipmr_fill_mroute(skb, c, NLMSG_DATA(nlh)) > 0) { |
@@ -525,7 +525,8 @@ static void ipmr_cache_resolve(struct mfc_cache *uc, struct mfc_cache *c) | |||
525 | e->error = -EMSGSIZE; | 525 | e->error = -EMSGSIZE; |
526 | memset(&e->msg, 0, sizeof(e->msg)); | 526 | memset(&e->msg, 0, sizeof(e->msg)); |
527 | } | 527 | } |
528 | err = netlink_unicast(rtnl, skb, NETLINK_CB(skb).dst_pid, MSG_DONTWAIT); | 528 | |
529 | rtnl_unicast(skb, NETLINK_CB(skb).pid); | ||
529 | } else | 530 | } else |
530 | ip_mr_forward(skb, c, 0); | 531 | ip_mr_forward(skb, c, 0); |
531 | } | 532 | } |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 12128b82c9dc..b8f6cadc5b3a 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2809,10 +2809,9 @@ int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg) | |||
2809 | goto out_free; | 2809 | goto out_free; |
2810 | } | 2810 | } |
2811 | 2811 | ||
2812 | err = netlink_unicast(rtnl, skb, NETLINK_CB(in_skb).pid, MSG_DONTWAIT); | 2812 | err = rtnl_unicast(skb, NETLINK_CB(in_skb).pid); |
2813 | if (err > 0) | 2813 | out: |
2814 | err = 0; | 2814 | return err; |
2815 | out: return err; | ||
2816 | 2815 | ||
2817 | out_free: | 2816 | out_free: |
2818 | kfree_skb(skb); | 2817 | kfree_skb(skb); |