diff options
author | RongQing.Li <roy.qing.li@gmail.com> | 2012-02-21 17:10:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-22 15:30:15 -0500 |
commit | 5d38b1f8cf8798d4df7809b3f3e38fad4d923e85 (patch) | |
tree | 06ba517dc59090a928dd8feabc348880adc79347 | |
parent | 0541743b4b35f2ddc9e490b4e354930168b60d23 (diff) |
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>
-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 3aae66facf9f..4d5057902839 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) | |||
152 | fl6.flowlabel = ((iph->flow_lbl[0] & 0xF) << 16) | | 152 | fl6.flowlabel = ((iph->flow_lbl[0] & 0xF) << 16) | |
153 | (iph->flow_lbl[1] << 8) | iph->flow_lbl[2]; | 153 | (iph->flow_lbl[1] << 8) | iph->flow_lbl[2]; |
154 | dst = ip6_route_output(net, NULL, &fl6); | 154 | dst = ip6_route_output(net, NULL, &fl6); |
155 | if (dst == NULL) | 155 | if (dst->error) { |
156 | dst_release(dst); | ||
156 | return false; | 157 | return false; |
157 | 158 | } | |
158 | skb_dst_drop(skb); | 159 | skb_dst_drop(skb); |
159 | skb_dst_set(skb, dst); | 160 | skb_dst_set(skb, dst); |
160 | skb->dev = dst->dev; | 161 | skb->dev = dst->dev; |