aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/fib_rules.h1
-rw-r--r--net/decnet/dn_rules.c1
-rw-r--r--net/ipv4/fib_rules.c2
-rw-r--r--net/ipv6/fib6_rules.c1
4 files changed, 5 insertions, 0 deletions
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index 4f472507129e..6910e0195ca5 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -67,6 +67,7 @@ struct fib_rules_ops
67 const struct nla_policy *policy; 67 const struct nla_policy *policy;
68 struct list_head rules_list; 68 struct list_head rules_list;
69 struct module *owner; 69 struct module *owner;
70 struct net *fro_net;
70}; 71};
71 72
72#define FRA_GENERIC_POLICY \ 73#define FRA_GENERIC_POLICY \
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 = {
249 .policy = dn_fib_rule_policy, 249 .policy = dn_fib_rule_policy,
250 .rules_list = LIST_HEAD_INIT(dn_fib_rules_ops.rules_list), 250 .rules_list = LIST_HEAD_INIT(dn_fib_rules_ops.rules_list),
251 .owner = THIS_MODULE, 251 .owner = THIS_MODULE,
252 .fro_net = &init_net,
252}; 253};
253 254
254void __init dn_fib_rules_init(void) 255void __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)
315 if (ops == NULL) 315 if (ops == NULL)
316 return -ENOMEM; 316 return -ENOMEM;
317 INIT_LIST_HEAD(&ops->rules_list); 317 INIT_LIST_HEAD(&ops->rules_list);
318 ops->fro_net = net;
319
318 fib_rules_register(net, ops); 320 fib_rules_register(net, ops);
319 321
320 err = fib_default_rules_init(ops); 322 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 = {
249 .policy = fib6_rule_policy, 249 .policy = fib6_rule_policy,
250 .rules_list = LIST_HEAD_INIT(fib6_rules_ops.rules_list), 250 .rules_list = LIST_HEAD_INIT(fib6_rules_ops.rules_list),
251 .owner = THIS_MODULE, 251 .owner = THIS_MODULE,
252 .fro_net = &init_net,
252}; 253};
253 254
254static int __init fib6_default_rules_init(void) 255static int __init fib6_default_rules_init(void)