diff options
author | Denis V. Lunev <den@openvz.org> | 2007-11-20 01:26:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:54:25 -0500 |
commit | 97c53cacf00d1f5aa04adabfebcc806ca8b22b10 (patch) | |
tree | 6b7223df312aa27a5017c4d7c4d1e500a33ed8d8 /net/sched | |
parent | b854272b3c732316676e9128f7b9e6f1e1ff88b0 (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')
-rw-r--r-- | net/sched/act_api.c | 8 | ||||
-rw-r--r-- | net/sched/cls_api.c | 2 | ||||
-rw-r--r-- | net/sched/sch_api.c | 4 |
3 files changed, 7 insertions, 7 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 | ||
666 | static struct tc_action * | 666 | static 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; |
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index fdab6a530bba..80dccac769d0 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -361,7 +361,7 @@ static int tfilter_notify(struct sk_buff *oskb, struct nlmsghdr *n, | |||
361 | return -EINVAL; | 361 | return -EINVAL; |
362 | } | 362 | } |
363 | 363 | ||
364 | return rtnetlink_send(skb, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO); | 364 | return rtnetlink_send(skb, &init_net, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO); |
365 | } | 365 | } |
366 | 366 | ||
367 | struct tcf_dump_args | 367 | struct tcf_dump_args |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index f30e3f7ad885..273c628be054 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -872,7 +872,7 @@ static int qdisc_notify(struct sk_buff *oskb, struct nlmsghdr *n, | |||
872 | } | 872 | } |
873 | 873 | ||
874 | if (skb->len) | 874 | if (skb->len) |
875 | return rtnetlink_send(skb, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO); | 875 | return rtnetlink_send(skb, &init_net, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO); |
876 | 876 | ||
877 | err_out: | 877 | err_out: |
878 | kfree_skb(skb); | 878 | kfree_skb(skb); |
@@ -1103,7 +1103,7 @@ static int tclass_notify(struct sk_buff *oskb, struct nlmsghdr *n, | |||
1103 | return -EINVAL; | 1103 | return -EINVAL; |
1104 | } | 1104 | } |
1105 | 1105 | ||
1106 | return rtnetlink_send(skb, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO); | 1106 | return rtnetlink_send(skb, &init_net, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO); |
1107 | } | 1107 | } |
1108 | 1108 | ||
1109 | struct qdisc_dump_args | 1109 | struct qdisc_dump_args |