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

Commit 5d38b1f8 authored by RongQing.Li's avatar RongQing.Li Committed by David S. Miller
Browse files

netfilter: 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: default avatarRongQing.Li <roy.qing.li@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0541743b
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -152,9 +152,10 @@ tee_tg_route6(struct sk_buff *skb, const struct xt_tee_tginfo *info)
	fl6.flowlabel = ((iph->flow_lbl[0] & 0xF) << 16) |
	fl6.flowlabel = ((iph->flow_lbl[0] & 0xF) << 16) |
			   (iph->flow_lbl[1] << 8) | iph->flow_lbl[2];
			   (iph->flow_lbl[1] << 8) | iph->flow_lbl[2];
	dst = ip6_route_output(net, NULL, &fl6);
	dst = ip6_route_output(net, NULL, &fl6);
	if (dst == NULL)
	if (dst->error) {
		dst_release(dst);
		return false;
		return false;

	}
	skb_dst_drop(skb);
	skb_dst_drop(skb);
	skb_dst_set(skb, dst);
	skb_dst_set(skb, dst);
	skb->dev      = dst->dev;
	skb->dev      = dst->dev;