Skip to content

Commit

Permalink
netfilter: ip6_route_output() never returns NULL.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
RongQing.Li authored and David S. Miller committed Feb 22, 2012
1 parent 0541743 commit 5d38b1f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/netfilter/xt_TEE.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
(iph->flow_lbl[1] << 8) | iph->flow_lbl[2];
dst = ip6_route_output(net, NULL, &fl6);
if (dst == NULL)
if (dst->error) {
dst_release(dst);
return false;

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

0 comments on commit 5d38b1f

Please sign in to comment.