summaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_addrtype.c
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2015-05-22 20:55:58 -0700
committerDavid S. Miller <davem@davemloft.net>2015-05-25 13:25:33 -0400
commit2647a9b07032c5a95ddee1fcb65d95bddbc6b7f9 (patch)
tree7274770a847506b7adb64501deac2f90123befa0 /net/netfilter/xt_addrtype.c
parentfd0273d7939f2ce3247f6aac5f6b9a0135d4cd39 (diff)
downloadlinux-0-day-2647a9b07032c5a95ddee1fcb65d95bddbc6b7f9.tar.gz
linux-0-day-2647a9b07032c5a95ddee1fcb65d95bddbc6b7f9.tar.xz
ipv6: Remove external dependency on rt6i_gateway and RTF_ANYCAST
When creating a RTF_CACHE route, RTF_ANYCAST is set based on rt6i_dst. Also, rt6i_gateway is always set to the nexthop while the nexthop could be a gateway or the rt6i_dst.addr. After removing the rt6i_dst and rt6i_src dependency in the last patch, we also need to stop the caller from depending on rt6i_gateway and RTF_ANYCAST. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Cc: Hannes Frederic Sowa <hannes@stressinduktion.org> Cc: Steffen Klassert <steffen.klassert@secunet.com> Cc: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/xt_addrtype.c')
-rw-r--r--net/netfilter/xt_addrtype.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/xt_addrtype.c b/net/netfilter/xt_addrtype.c
index fab6eea1bf382..5b4743cc04361 100644
--- a/net/netfilter/xt_addrtype.c
+++ b/net/netfilter/xt_addrtype.c
@@ -73,7 +73,7 @@ static u32 match_lookup_rt6(struct net *net, const struct net_device *dev,
if (dev == NULL && rt->rt6i_flags & RTF_LOCAL)
ret |= XT_ADDRTYPE_LOCAL;
- if (rt->rt6i_flags & RTF_ANYCAST)
+ if (ipv6_anycast_destination((struct dst_entry *)rt, addr))
ret |= XT_ADDRTYPE_ANYCAST;
dst_release(&rt->dst);