diff options
author | Daniel Lezcano <dlezcano@fr.ibm.com> | 2008-03-04 16:48:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-04 16:48:10 -0500 |
commit | bdb3289f739e94bcae8b51972ae844ec66c2f4df (patch) | |
tree | 2ffffce475a82a69bbe8092be3d3f260fe83b003 /net/ipv6/fib6_rules.c | |
parent | 5578689a4e3c04f2d43ea39736fd3fa396d80c6e (diff) |
[NETNS][IPV6] rt6_info - make rt6_info accessed as a pointer
This patch make mindless changes and prepares the code to use dynamic
allocation for rt6_info structure. The code accesses the rt6_info
structure as a pointer instead of a global static variable.
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.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index 89cb092c9732..c00055f232c4 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(&ip6_null_entry->u.dst); |
47 | return &ip6_null_entry.u.dst; | 47 | return &ip6_null_entry->u.dst; |
48 | } | 48 | } |
49 | 49 | ||
50 | static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, | 50 | static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, |
@@ -58,14 +58,14 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, | |||
58 | case FR_ACT_TO_TBL: | 58 | case FR_ACT_TO_TBL: |
59 | break; | 59 | break; |
60 | case FR_ACT_UNREACHABLE: | 60 | case FR_ACT_UNREACHABLE: |
61 | rt = &ip6_null_entry; | 61 | rt = ip6_null_entry; |
62 | goto discard_pkt; | 62 | goto discard_pkt; |
63 | default: | 63 | default: |
64 | case FR_ACT_BLACKHOLE: | 64 | case FR_ACT_BLACKHOLE: |
65 | rt = &ip6_blk_hole_entry; | 65 | rt = ip6_blk_hole_entry; |
66 | goto discard_pkt; | 66 | goto discard_pkt; |
67 | case FR_ACT_PROHIBIT: | 67 | case FR_ACT_PROHIBIT: |
68 | rt = &ip6_prohibit_entry; | 68 | rt = ip6_prohibit_entry; |
69 | goto discard_pkt; | 69 | goto discard_pkt; |
70 | } | 70 | } |
71 | 71 | ||
@@ -73,7 +73,7 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, | |||
73 | if (table) | 73 | if (table) |
74 | rt = lookup(table, flp, flags); | 74 | rt = lookup(table, flp, flags); |
75 | 75 | ||
76 | if (rt != &ip6_null_entry) { | 76 | if (rt != ip6_null_entry) { |
77 | struct fib6_rule *r = (struct fib6_rule *)rule; | 77 | struct fib6_rule *r = (struct fib6_rule *)rule; |
78 | 78 | ||
79 | /* | 79 | /* |