Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1429553 authored by Ville Nuorvala's avatar Ville Nuorvala Committed by David S. Miller
Browse files

[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: default avatarVille Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 99a92ff5
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -63,7 +63,11 @@ struct dst_entry *fib6_rule_lookup(struct flowi *fl, int flags,
	if (arg.rule)
	if (arg.rule)
		fib_rule_put(arg.rule);
		fib_rule_put(arg.rule);


	if (arg.result)
		return (struct dst_entry *) 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,
static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,