diff options
author | RongQing.Li <roy.qing.li@gmail.com> | 2012-02-21 22:10:51 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-22 15:30:15 -0500 |
commit | 5d38b1f8cf8798d4df7809b3f3e38fad4d923e85 (patch) | |
tree | 06ba517dc59090a928dd8feabc348880adc79347 /net | |
parent | 0541743b4b35f2ddc9e490b4e354930168b60d23 (diff) | |
download | op-kernel-dev-5d38b1f8cf8798d4df7809b3f3e38fad4d923e85.zip op-kernel-dev-5d38b1f8cf8798d4df7809b3f3e38fad4d923e85.tar.gz |
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: RongQing.Li <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/xt_TEE.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/netfilter/xt_TEE.c b/net/netfilter/xt_TEE.c index 3aae66f..4d50579 100644 --- a/net/netfilter/xt_TEE.c +++ b/net/netfilter/xt_TEE.c @@ -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; |