This patch makes the fib6_rules per network namespace. Signed-off-by: Daniel Lezcano Signed-off-by: Benjamin Thery --- net/ipv6/fib6_rules.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Index: linux-2.6-netns/net/ipv6/fib6_rules.c =================================================================== --- linux-2.6-netns.orig/net/ipv6/fib6_rules.c +++ linux-2.6-netns/net/ipv6/fib6_rules.c @@ -53,6 +53,7 @@ static int fib6_rule_action(struct fib_r int flags, struct fib_lookup_arg *arg) { struct rt6_info *rt = NULL; + struct net *net = flp->fl_net; struct fib6_table *table; pol_lookup_t lookup = arg->lookup_ptr; @@ -71,7 +72,7 @@ static int fib6_rule_action(struct fib_r goto discard_pkt; } - table = fib6_get_table(&init_net, rule->table); + table = fib6_get_table(net, rule->table); if (table) rt = lookup(table, flp, flags); @@ -145,13 +146,14 @@ static int fib6_rule_configure(struct fi struct nlattr **tb) { int err = -EINVAL; + struct net *net = skb->sk->sk_net; struct fib6_rule *rule6 = (struct fib6_rule *) rule; if (rule->action == FR_ACT_TO_TBL) { if (rule->table == RT6_TABLE_UNSPEC) goto errout; - if (fib6_new_table(&init_net, rule->table) == NULL) { + if (fib6_new_table(net, rule->table) == NULL) { err = -ENOBUFS; goto errout; } -- _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers