diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-21 01:46:01 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-29 00:08:13 +0100 |
commit | 035923833369e4da5d3c4ad0700bc7c367a0fa37 (patch) | |
tree | 2a7e3105e70a543ff2611ffbe7612b4c93ce3bd5 /net | |
parent | [SCTP]: Correctly initialize error when parameter validation failed. (diff) | |
download | linux-035923833369e4da5d3c4ad0700bc7c367a0fa37.tar.xz linux-035923833369e4da5d3c4ad0700bc7c367a0fa37.zip |
[FIB]: Add netns to fib_rules_ops.
The backward link from FIB rules operations to the network namespace
will allow to simplify the API a bit.
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')
-rw-r--r-- | net/decnet/dn_rules.c | 1 | ||||
-rw-r--r-- | net/ipv4/fib_rules.c | 2 | ||||
-rw-r--r-- | net/ipv6/fib6_rules.c | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c index c1fae23d2263..964e65887603 100644 --- a/net/decnet/dn_rules.c +++ b/net/decnet/dn_rules.c @@ -249,6 +249,7 @@ static struct fib_rules_ops dn_fib_rules_ops = { .policy = dn_fib_rule_policy, .rules_list = LIST_HEAD_INIT(dn_fib_rules_ops.rules_list), .owner = THIS_MODULE, + .fro_net = &init_net, }; void __init dn_fib_rules_init(void) diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c index 72232ab4ecb1..8d0ebe7f360d 100644 --- a/net/ipv4/fib_rules.c +++ b/net/ipv4/fib_rules.c @@ -315,6 +315,8 @@ int __net_init fib4_rules_init(struct net *net) if (ops == NULL) return -ENOMEM; INIT_LIST_HEAD(&ops->rules_list); + ops->fro_net = net; + fib_rules_register(net, ops); err = fib_default_rules_init(ops); diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index 76437a1fcab0..ead5ab2da9a2 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c @@ -249,6 +249,7 @@ static struct fib_rules_ops fib6_rules_ops = { .policy = fib6_rule_policy, .rules_list = LIST_HEAD_INIT(fib6_rules_ops.rules_list), .owner = THIS_MODULE, + .fro_net = &init_net, }; static int __init fib6_default_rules_init(void) |