Skip to content

Commit c440f16

Browse files
yoshfujidavem330
authored andcommitted
ipv6: Do not depend on rt->n in ip6_pol_route().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ac3175f commit c440f16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv6/route.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ static struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
925925
dst_hold(&rt->dst);
926926
read_unlock_bh(&table->tb6_lock);
927927

928-
if (!rt->n && !(rt->rt6i_flags & RTF_NONEXTHOP))
928+
if (!(rt->rt6i_flags & (RTF_NONEXTHOP | RTF_GATEWAY)))
929929
nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr);
930930
else if (!(rt->dst.flags & DST_HOST))
931931
nrt = rt6_alloc_clone(rt, &fl6->daddr);

0 commit comments

Comments
 (0)