diff options
author | Ville Nuorvala <vnuorval@tcs.hut.fi> | 2006-08-08 19:44:17 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 17:54:12 -0400 |
commit | b14295532421c40f82ee099fdbd3d011f022e756 (patch) | |
tree | 5b08b1c3ef0a33952db11c484fb0e2c69190aac6 /net/ipv6/fib6_rules.c | |
parent | 99a92ff50424146ba01a222248fd47a1cd55b78f (diff) |
[IPV6]: Make sure fib6_rule_lookup doesn't return NULL
The callers of fib6_rule_lookup don't expect it to return NULL,
therefore it must return ip6_null_entry whenever fib_rule_lookup fails.
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
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 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index bf9bba83b852..22a2fdb09831 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c | |||
@@ -63,7 +63,11 @@ struct dst_entry *fib6_rule_lookup(struct flowi *fl, int flags, | |||
63 | if (arg.rule) | 63 | if (arg.rule) |
64 | fib_rule_put(arg.rule); | 64 | fib_rule_put(arg.rule); |
65 | 65 | ||
66 | return (struct dst_entry *) arg.result; | 66 | if (arg.result) |
67 | return (struct dst_entry *) arg.result; | ||
68 | |||
69 | dst_hold(&ip6_null_entry.u.dst); | ||
70 | return &ip6_null_entry.u.dst; | ||
67 | } | 71 | } |
68 | 72 | ||
69 | static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, | 73 | static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, |