aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/fib6_rules.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index 27ca79682efb..273eb26cd6d4 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -299,19 +299,16 @@ static int __net_init fib6_rules_net_init(struct net *net)
299 ops = fib_rules_register(&fib6_rules_ops_template, net); 299 ops = fib_rules_register(&fib6_rules_ops_template, net);
300 if (IS_ERR(ops)) 300 if (IS_ERR(ops))
301 return PTR_ERR(ops); 301 return PTR_ERR(ops);
302 net->ipv6.fib6_rules_ops = ops;
303
304 302
305 err = fib_default_rule_add(net->ipv6.fib6_rules_ops, 0, 303 err = fib_default_rule_add(ops, 0, RT6_TABLE_LOCAL, 0);
306 RT6_TABLE_LOCAL, 0);
307 if (err) 304 if (err)
308 goto out_fib6_rules_ops; 305 goto out_fib6_rules_ops;
309 306
310 err = fib_default_rule_add(net->ipv6.fib6_rules_ops, 307 err = fib_default_rule_add(ops, 0x7FFE, RT6_TABLE_MAIN, 0);
311 0x7FFE, RT6_TABLE_MAIN, 0);
312 if (err) 308 if (err)
313 goto out_fib6_rules_ops; 309 goto out_fib6_rules_ops;
314 310
311 net->ipv6.fib6_rules_ops = ops;
315out: 312out:
316 return err; 313 return err;
317 314