aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/route.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index fd399ac6c1f7..c28cdda3f5db 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -871,11 +871,9 @@ static struct rt6_info *rt6_alloc_cow(struct rt6_info *ort,
871 rt = ip6_rt_copy(ort, daddr); 871 rt = ip6_rt_copy(ort, daddr);
872 872
873 if (rt) { 873 if (rt) {
874 if (!(rt->rt6i_flags & RTF_GATEWAY)) { 874 if (ort->rt6i_dst.plen != 128 &&
875 if (ort->rt6i_dst.plen != 128 && 875 ipv6_addr_equal(&ort->rt6i_dst.addr, daddr))
876 ipv6_addr_equal(&ort->rt6i_dst.addr, daddr)) 876 rt->rt6i_flags |= RTF_ANYCAST;
877 rt->rt6i_flags |= RTF_ANYCAST;
878 }
879 877
880 rt->rt6i_flags |= RTF_CACHE; 878 rt->rt6i_flags |= RTF_CACHE;
881 879