aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-01-20 19:47:09 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:08:14 -0500
commit51314a17baabc710e5fb12975fe8983dedd5ac0d (patch)
treec0aaa74535570247f34a60bd80133c70881144b6 /net/core
parent9e3a548781fc1c0da617fc65769a515f074be740 (diff)
[NETNS]: Process FIB rule action in the context of the namespace.
Save namespace context on the fib rule at the rule creation time and call routing lookup in the correct namespace. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/fib_rules.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 3cd4f13413f6..42ccaf5b8509 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -29,6 +29,7 @@ int fib_default_rule_add(struct fib_rules_ops *ops,
29 r->pref = pref; 29 r->pref = pref;
30 r->table = table; 30 r->table = table;
31 r->flags = flags; 31 r->flags = flags;
32 r->fr_net = ops->fro_net;
32 33
33 /* The lock is not required here, the list in unreacheable 34 /* The lock is not required here, the list in unreacheable
34 * at the moment this function is called */ 35 * at the moment this function is called */
@@ -242,6 +243,7 @@ static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
242 err = -ENOMEM; 243 err = -ENOMEM;
243 goto errout; 244 goto errout;
244 } 245 }
246 rule->fr_net = net;
245 247
246 if (tb[FRA_PRIORITY]) 248 if (tb[FRA_PRIORITY])
247 rule->pref = nla_get_u32(tb[FRA_PRIORITY]); 249 rule->pref = nla_get_u32(tb[FRA_PRIORITY]);