Commit ed1c9f0e78b3b360ade4fb838a6099d643f3cd04
Committed by
Simon Horman
1 parent
a29a9a585b
ipvs: Remove possibly unused variable from ip_vs_out
Eric's net namespace changes in 1b75097dd7a26 leaves net unreferenced if CONFIG_IP_VS_IPV6 is not enabled: ../net/netfilter/ipvs/ip_vs_core.c: In function ‘ip_vs_out’: ../net/netfilter/ipvs/ip_vs_core.c:1177:14: warning: unused variable ‘net’ [-Wunused-variable] After the net refactoring there is only 1 user; push the reference to the 1 user. While the line length slightly exceeds 80 it seems to be the best change. Fixes: 1b75097dd7a26("ipvs: Pass ipvs into ip_vs_out") Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Acked-by: Julian Anastasov <ja@ssi.bg> [horms: updated subject] Signed-off-by: Simon Horman <horms@verge.net.au>
Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff
net/netfilter/ipvs/ip_vs_core.c
... | ... | @@ -1172,7 +1172,6 @@ |
1172 | 1172 | static unsigned int |
1173 | 1173 | ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, int af) |
1174 | 1174 | { |
1175 | - struct net *net = ipvs->net; | |
1176 | 1175 | struct ip_vs_iphdr iph; |
1177 | 1176 | struct ip_vs_protocol *pp; |
1178 | 1177 | struct ip_vs_proto_data *pd; |
... | ... | @@ -1272,7 +1271,7 @@ |
1272 | 1271 | #ifdef CONFIG_IP_VS_IPV6 |
1273 | 1272 | if (af == AF_INET6) { |
1274 | 1273 | if (!skb->dev) |
1275 | - skb->dev = net->loopback_dev; | |
1274 | + skb->dev = ipvs->net->loopback_dev; | |
1276 | 1275 | icmpv6_send(skb, |
1277 | 1276 | ICMPV6_DEST_UNREACH, |
1278 | 1277 | ICMPV6_PORT_UNREACH, |