projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0541743
)
netfilter: ip6_route_output() never returns NULL.
author
RongQing.Li
<roy.qing.li@gmail.com>
Tue, 21 Feb 2012 22:10:51 +0000
(22:10 +0000)
committer
David S. Miller
<davem@davemloft.net>
Wed, 22 Feb 2012 20:30:15 +0000
(15:30 -0500)
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>
net/netfilter/xt_TEE.c
patch
|
blob
|
blame
|
history
diff --git
a/net/netfilter/xt_TEE.c
b/net/netfilter/xt_TEE.c
index 3aae66facf9f79d8128857a24461127b0e6389b3..4d5057902839888f1fd5afab0c75ebbaab63775b 100644
(file)
--- 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;