Commit 69f390934b26154573fc7c360645ced8b0c7871a
Committed by
Simon Horman
1 parent
a43d1a6b97
ipvs: Remove net argument from ip_vs_tcp_conn_listen
The argument is unnecessary and in practice confusing, and has caused the callers to do all manner of silly things. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
Showing 3 changed files with 5 additions and 9 deletions Side-by-side Diff
include/net/ip_vs.h
... | ... | @@ -1271,7 +1271,7 @@ |
1271 | 1271 | |
1272 | 1272 | const char *ip_vs_state_name(__u16 proto, int state); |
1273 | 1273 | |
1274 | -void ip_vs_tcp_conn_listen(struct net *net, struct ip_vs_conn *cp); | |
1274 | +void ip_vs_tcp_conn_listen(struct ip_vs_conn *cp); | |
1275 | 1275 | int ip_vs_check_template(struct ip_vs_conn *ct); |
1276 | 1276 | void ip_vs_random_dropentry(struct netns_ipvs *ipvs); |
1277 | 1277 | int ip_vs_conn_init(void); |
net/netfilter/ipvs/ip_vs_ftp.c
... | ... | @@ -181,7 +181,6 @@ |
181 | 181 | int ret = 0; |
182 | 182 | enum ip_conntrack_info ctinfo; |
183 | 183 | struct nf_conn *ct; |
184 | - struct net *net; | |
185 | 184 | |
186 | 185 | *diff = 0; |
187 | 186 | |
188 | 187 | |
... | ... | @@ -289,9 +288,8 @@ |
289 | 288 | * would be adjusted twice. |
290 | 289 | */ |
291 | 290 | |
292 | - net = skb_net(skb); | |
293 | 291 | cp->app_data = NULL; |
294 | - ip_vs_tcp_conn_listen(net, n_cp); | |
292 | + ip_vs_tcp_conn_listen(n_cp); | |
295 | 293 | ip_vs_conn_put(n_cp); |
296 | 294 | return ret; |
297 | 295 | } |
... | ... | @@ -320,7 +318,6 @@ |
320 | 318 | union nf_inet_addr to; |
321 | 319 | __be16 port; |
322 | 320 | struct ip_vs_conn *n_cp; |
323 | - struct net *net; | |
324 | 321 | |
325 | 322 | /* no diff required for incoming packets */ |
326 | 323 | *diff = 0; |
... | ... | @@ -413,8 +410,7 @@ |
413 | 410 | /* |
414 | 411 | * Move tunnel to listen state |
415 | 412 | */ |
416 | - net = skb_net(skb); | |
417 | - ip_vs_tcp_conn_listen(net, n_cp); | |
413 | + ip_vs_tcp_conn_listen(n_cp); | |
418 | 414 | ip_vs_conn_put(n_cp); |
419 | 415 | |
420 | 416 | return 1; |
net/netfilter/ipvs/ip_vs_proto_tcp.c
... | ... | @@ -672,9 +672,9 @@ |
672 | 672 | /* |
673 | 673 | * Set LISTEN timeout. (ip_vs_conn_put will setup timer) |
674 | 674 | */ |
675 | -void ip_vs_tcp_conn_listen(struct net *net, struct ip_vs_conn *cp) | |
675 | +void ip_vs_tcp_conn_listen(struct ip_vs_conn *cp) | |
676 | 676 | { |
677 | - struct ip_vs_proto_data *pd = ip_vs_proto_data_get(net_ipvs(net), IPPROTO_TCP); | |
677 | + struct ip_vs_proto_data *pd = ip_vs_proto_data_get(cp->ipvs, IPPROTO_TCP); | |
678 | 678 | |
679 | 679 | spin_lock_bh(&cp->lock); |
680 | 680 | cp->state = IP_VS_TCP_S_LISTEN; |