]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ipv6: Do not depend on rt->n in ip6_pol_route().
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Thu, 17 Jan 2013 12:53:32 +0000 (12:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Jan 2013 23:38:19 +0000 (18:38 -0500)
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c

index d82eb1f24b25cbf5013622a13e13ea33c59a327d..2839381116ea574a1faf95d71954797074718bfc 100644 (file)
@@ -925,7 +925,7 @@ restart:
        dst_hold(&rt->dst);
        read_unlock_bh(&table->tb6_lock);
 
-       if (!rt->n && !(rt->rt6i_flags & RTF_NONEXTHOP))
+       if (!(rt->rt6i_flags & (RTF_NONEXTHOP | RTF_GATEWAY)))
                nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr);
        else if (!(rt->dst.flags & DST_HOST))
                nrt = rt6_alloc_clone(rt, &fl6->daddr);