ipv6: ip6_route_output() never returns NULL.
ip6_route_output() never returns NULL, so it is wrong to check if the return value is NULL. Signed-off-by: RongQing.Li <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
ba9adbe67e
commit
5095d64db1
@@ -1926,8 +1926,10 @@ static int ip6mr_forward2(struct net *net, struct mr6_table *mrt,
|
||||
};
|
||||
|
||||
dst = ip6_route_output(net, NULL, &fl6);
|
||||
if (!dst)
|
||||
if (dst->error) {
|
||||
dst_release(dst);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
skb_dst_drop(skb);
|
||||
skb_dst_set(skb, dst);
|
||||
|
Reference in New Issue
Block a user