diff options
| author | Haishuang Yan <yanhaishuang@cmss.chinamobile.com> | 2016-04-03 10:03:33 -0400 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-04-07 12:53:08 -0400 |
| commit | 85f1e7c29a46360b1b5f9cf87af6b27066c345fd (patch) | |
| tree | 20698d20c27bb23840b54b8266ef8f7960c14fa5 | |
| parent | 8fef24ca90fb79de8454e26e9f3eae6cc610de1a (diff) | |
netfilter: ipv6: unnecessary to check whether ip6_route_output() returns NULL
ip6_route_output() never returns NULL, so it is not appropriate to
check if the return value is NULL.
Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| -rw-r--r-- | net/ipv6/netfilter/nf_reject_ipv6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/netfilter/nf_reject_ipv6.c b/net/ipv6/netfilter/nf_reject_ipv6.c index 4709f657b7b6..a5400223fd74 100644 --- a/net/ipv6/netfilter/nf_reject_ipv6.c +++ b/net/ipv6/netfilter/nf_reject_ipv6.c | |||
| @@ -158,7 +158,7 @@ void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook) | |||
| 158 | fl6.fl6_dport = otcph->source; | 158 | fl6.fl6_dport = otcph->source; |
| 159 | security_skb_classify_flow(oldskb, flowi6_to_flowi(&fl6)); | 159 | security_skb_classify_flow(oldskb, flowi6_to_flowi(&fl6)); |
| 160 | dst = ip6_route_output(net, NULL, &fl6); | 160 | dst = ip6_route_output(net, NULL, &fl6); |
| 161 | if (dst == NULL || dst->error) { | 161 | if (dst->error) { |
| 162 | dst_release(dst); | 162 | dst_release(dst); |
| 163 | return; | 163 | return; |
| 164 | } | 164 | } |
