提交 b1429553 编写于 作者: V Ville Nuorvala 提交者: David S. Miller

[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: NVille Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 99a92ff5
......@@ -63,7 +63,11 @@ struct dst_entry *fib6_rule_lookup(struct flowi *fl, int flags,
if (arg.rule)
fib_rule_put(arg.rule);
if (arg.result)
return (struct dst_entry *) arg.result;
dst_hold(&ip6_null_entry.u.dst);
return &ip6_null_entry.u.dst;
}
static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册