]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
netfilter: ipv6: unnecessary to check whether ip6_route_output() returns NULL
authorHaishuang Yan <yanhaishuang@cmss.chinamobile.com>
Sun, 3 Apr 2016 14:03:33 +0000 (22:03 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 7 Apr 2016 16:53:08 +0000 (18:53 +0200)
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>
net/ipv6/netfilter/nf_reject_ipv6.c

index 4709f657b7b6be1943bab3f1bf07c5c47e386df5..a5400223fd743ff012ab7318c7ad6845c1f6b36c 100644 (file)
@@ -158,7 +158,7 @@ void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook)
        fl6.fl6_dport = otcph->source;
        security_skb_classify_flow(oldskb, flowi6_to_flowi(&fl6));
        dst = ip6_route_output(net, NULL, &fl6);
-       if (dst == NULL || dst->error) {
+       if (dst->error) {
                dst_release(dst);
                return;
        }