From 831e707edc799d501e8e9c569f29a8e107043a04 Mon Sep 17 00:00:00 2001 From: "Denis V. Lunev" Date: Sun, 20 Jan 2008 16:47:09 -0800 Subject: [PATCH] --- yaml --- r: 79285 b: refs/heads/master c: 51314a17baabc710e5fb12975fe8983dedd5ac0d h: refs/heads/master i: 79283: bb17ad7a14c0c6d60fcea011468ea498b5d121bc v: v3 --- [refs] | 2 +- trunk/include/net/fib_rules.h | 1 + trunk/net/core/fib_rules.c | 2 ++ trunk/net/ipv4/fib_rules.c | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index e423f509ca77..859ea0c6601a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9e3a548781fc1c0da617fc65769a515f074be740 +refs/heads/master: 51314a17baabc710e5fb12975fe8983dedd5ac0d diff --git a/trunk/include/net/fib_rules.h b/trunk/include/net/fib_rules.h index 7f9f4aec8fc8..34349f9f4331 100644 --- a/trunk/include/net/fib_rules.h +++ b/trunk/include/net/fib_rules.h @@ -22,6 +22,7 @@ struct fib_rule u32 target; struct fib_rule * ctarget; struct rcu_head rcu; + struct net * fr_net; }; struct fib_lookup_arg diff --git a/trunk/net/core/fib_rules.c b/trunk/net/core/fib_rules.c index 3cd4f13413f6..42ccaf5b8509 100644 --- a/trunk/net/core/fib_rules.c +++ b/trunk/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]); diff --git a/trunk/net/ipv4/fib_rules.c b/trunk/net/ipv4/fib_rules.c index 3b7affd5cb3b..d2001f1c28a2 100644 --- a/trunk/net/ipv4/fib_rules.c +++ b/trunk/net/ipv4/fib_rules.c @@ -91,7 +91,7 @@ static int fib4_rule_action(struct fib_rule *rule, struct flowi *flp, goto errout; } - if ((tbl = fib_get_table(&init_net, rule->table)) == NULL) + if ((tbl = fib_get_table(rule->fr_net, rule->table)) == NULL) goto errout; err = tbl->tb_lookup(tbl, flp, (struct fib_result *) arg->result);