diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index dd811b8dd97c..d43e3c122f7b 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -76,19 +76,19 @@ static void __ip_vs_del_service(struct ip_vs_service *svc); | |||
76 | 76 | ||
77 | #ifdef CONFIG_IP_VS_IPV6 | 77 | #ifdef CONFIG_IP_VS_IPV6 |
78 | /* Taken from rt6_fill_node() in net/ipv6/route.c, is there a better way? */ | 78 | /* Taken from rt6_fill_node() in net/ipv6/route.c, is there a better way? */ |
79 | static int __ip_vs_addr_is_local_v6(struct net *net, | 79 | static bool __ip_vs_addr_is_local_v6(struct net *net, |
80 | const struct in6_addr *addr) | 80 | const struct in6_addr *addr) |
81 | { | 81 | { |
82 | struct rt6_info *rt; | ||
83 | struct flowi6 fl6 = { | 82 | struct flowi6 fl6 = { |
84 | .daddr = *addr, | 83 | .daddr = *addr, |
85 | }; | 84 | }; |
85 | struct dst_entry *dst = ip6_route_output(net, NULL, &fl6); | ||
86 | bool is_local; | ||
86 | 87 | ||
87 | rt = (struct rt6_info *)ip6_route_output(net, NULL, &fl6); | 88 | is_local = !dst->error && dst->dev && (dst->dev->flags & IFF_LOOPBACK); |
88 | if (rt && rt->dst.dev && (rt->dst.dev->flags & IFF_LOOPBACK)) | ||
89 | return 1; | ||
90 | 89 | ||
91 | return 0; | 90 | dst_release(dst); |
91 | return is_local; | ||
92 | } | 92 | } |
93 | #endif | 93 | #endif |
94 | 94 | ||