aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/fib6_rules.c
diff options
context:
space:
mode:
authorDaniel Lezcano <dlezcano@fr.ibm.com>2008-03-04 16:48:30 -0500
committerDavid S. Miller <davem@davemloft.net>2008-03-04 16:48:30 -0500
commit8ed677896752fff056f6cf3d7ce462adc6c464f0 (patch)
tree8b0cc80f1d199760e484810b1abb9e3c95f64a05 /net/ipv6/fib6_rules.c
parentbdb3289f739e94bcae8b51972ae844ec66c2f4df (diff)
[NETNS][IPV6] rt6_info - move rt6_info structure inside the namespace
The rt6_info structures are moved inside the network namespace structure. All references to these structures are now relative to the initial network namespace. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/fib6_rules.c')
-rw-r--r--net/ipv6/fib6_rules.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index c00055f232c4..55137408f054 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -43,8 +43,8 @@ struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi *fl,
43 if (arg.result) 43 if (arg.result)
44 return arg.result; 44 return arg.result;
45 45
46 dst_hold(&ip6_null_entry->u.dst); 46 dst_hold(&net->ipv6.ip6_null_entry->u.dst);
47 return &ip6_null_entry->u.dst; 47 return &net->ipv6.ip6_null_entry->u.dst;
48} 48}
49 49
50static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, 50static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
@@ -52,28 +52,29 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
52{ 52{
53 struct rt6_info *rt = NULL; 53 struct rt6_info *rt = NULL;
54 struct fib6_table *table; 54 struct fib6_table *table;
55 struct net *net = rule->fr_net;
55 pol_lookup_t lookup = arg->lookup_ptr; 56 pol_lookup_t lookup = arg->lookup_ptr;
56 57
57 switch (rule->action) { 58 switch (rule->action) {
58 case FR_ACT_TO_TBL: 59 case FR_ACT_TO_TBL:
59 break; 60 break;
60 case FR_ACT_UNREACHABLE: 61 case FR_ACT_UNREACHABLE:
61 rt = ip6_null_entry; 62 rt = net->ipv6.ip6_null_entry;
62 goto discard_pkt; 63 goto discard_pkt;
63 default: 64 default:
64 case FR_ACT_BLACKHOLE: 65 case FR_ACT_BLACKHOLE:
65 rt = ip6_blk_hole_entry; 66 rt = net->ipv6.ip6_blk_hole_entry;
66 goto discard_pkt; 67 goto discard_pkt;
67 case FR_ACT_PROHIBIT: 68 case FR_ACT_PROHIBIT:
68 rt = ip6_prohibit_entry; 69 rt = net->ipv6.ip6_prohibit_entry;
69 goto discard_pkt; 70 goto discard_pkt;
70 } 71 }
71 72
72 table = fib6_get_table(rule->fr_net, rule->table); 73 table = fib6_get_table(net, rule->table);
73 if (table) 74 if (table)
74 rt = lookup(table, flp, flags); 75 rt = lookup(net, table, flp, flags);
75 76
76 if (rt != ip6_null_entry) { 77 if (rt != net->ipv6.ip6_null_entry) {
77 struct fib6_rule *r = (struct fib6_rule *)rule; 78 struct fib6_rule *r = (struct fib6_rule *)rule;
78 79
79 /* 80 /*