aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_api.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2007-11-20 01:26:51 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:54:25 -0500
commit97c53cacf00d1f5aa04adabfebcc806ca8b22b10 (patch)
tree6b7223df312aa27a5017c4d7c4d1e500a33ed8d8 /net/sched/act_api.c
parentb854272b3c732316676e9128f7b9e6f1e1ff88b0 (diff)
[NET]: Make rtnetlink infrastructure network namespace aware (v3)
After this patch none of the netlink callback support anything except the initial network namespace but the rtnetlink infrastructure now handles multiple network namespaces. Changes from v2: - IPv6 addrlabel processing Changes from v1: - no need for special rtnl_unlock handling - fixed IPv6 ndisc Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_api.c')
-rw-r--r--net/sched/act_api.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 852829139c67..81506474a4f7 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -660,7 +660,7 @@ act_get_notify(u32 pid, struct nlmsghdr *n, struct tc_action *a, int event)
660 return -EINVAL; 660 return -EINVAL;
661 } 661 }
662 662
663 return rtnl_unicast(skb, pid); 663 return rtnl_unicast(skb, &init_net, pid);
664} 664}
665 665
666static struct tc_action * 666static struct tc_action *
@@ -781,7 +781,7 @@ static int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)
781 nlh->nlmsg_flags |= NLM_F_ROOT; 781 nlh->nlmsg_flags |= NLM_F_ROOT;
782 module_put(a->ops->owner); 782 module_put(a->ops->owner);
783 kfree(a); 783 kfree(a);
784 err = rtnetlink_send(skb, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO); 784 err = rtnetlink_send(skb, &init_net, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO);
785 if (err > 0) 785 if (err > 0)
786 return 0; 786 return 0;
787 787
@@ -844,7 +844,7 @@ tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event)
844 844
845 /* now do the delete */ 845 /* now do the delete */
846 tcf_action_destroy(head, 0); 846 tcf_action_destroy(head, 0);
847 ret = rtnetlink_send(skb, pid, RTNLGRP_TC, 847 ret = rtnetlink_send(skb, &init_net, pid, RTNLGRP_TC,
848 n->nlmsg_flags&NLM_F_ECHO); 848 n->nlmsg_flags&NLM_F_ECHO);
849 if (ret > 0) 849 if (ret > 0)
850 return 0; 850 return 0;
@@ -888,7 +888,7 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
888 nlh->nlmsg_len = skb_tail_pointer(skb) - b; 888 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
889 NETLINK_CB(skb).dst_group = RTNLGRP_TC; 889 NETLINK_CB(skb).dst_group = RTNLGRP_TC;
890 890
891 err = rtnetlink_send(skb, pid, RTNLGRP_TC, flags&NLM_F_ECHO); 891 err = rtnetlink_send(skb, &init_net, pid, RTNLGRP_TC, flags&NLM_F_ECHO);
892 if (err > 0) 892 if (err > 0)
893 err = 0; 893 err = 0;
894 return err; 894 return err;