diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-20 16:47:09 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:08:14 -0800 |
commit | 51314a17baabc710e5fb12975fe8983dedd5ac0d (patch) | |
tree | c0aaa74535570247f34a60bd80133c70881144b6 /net/core/fib_rules.c | |
parent | 9e3a548781fc1c0da617fc65769a515f074be740 (diff) | |
download | linux-51314a17baabc710e5fb12975fe8983dedd5ac0d.tar.gz linux-51314a17baabc710e5fb12975fe8983dedd5ac0d.tar.bz2 linux-51314a17baabc710e5fb12975fe8983dedd5ac0d.zip |
[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/fib_rules.c')
-rw-r--r-- | net/core/fib_rules.c | 2 |
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, r->pref = pref; r->table = table; r->flags = flags; + r->fr_net = ops->fro_net; /* The lock is not required here, the list in unreacheable * 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) err = -ENOMEM; goto errout; } + rule->fr_net = net; if (tb[FRA_PRIORITY]) rule->pref = nla_get_u32(tb[FRA_PRIORITY]); |