Commit 69f39093 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Simon Horman

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: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: default avatarJulian Anastasov <ja@ssi.bg>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
parent a43d1a6b
...@@ -1271,7 +1271,7 @@ void ip_vs_conn_expire_now(struct ip_vs_conn *cp); ...@@ -1271,7 +1271,7 @@ void ip_vs_conn_expire_now(struct ip_vs_conn *cp);
const char *ip_vs_state_name(__u16 proto, int state); const char *ip_vs_state_name(__u16 proto, int state);
void ip_vs_tcp_conn_listen(struct net *net, struct ip_vs_conn *cp); void ip_vs_tcp_conn_listen(struct ip_vs_conn *cp);
int ip_vs_check_template(struct ip_vs_conn *ct); int ip_vs_check_template(struct ip_vs_conn *ct);
void ip_vs_random_dropentry(struct netns_ipvs *ipvs); void ip_vs_random_dropentry(struct netns_ipvs *ipvs);
int ip_vs_conn_init(void); int ip_vs_conn_init(void);
......
...@@ -181,7 +181,6 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp, ...@@ -181,7 +181,6 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
int ret = 0; int ret = 0;
enum ip_conntrack_info ctinfo; enum ip_conntrack_info ctinfo;
struct nf_conn *ct; struct nf_conn *ct;
struct net *net;
*diff = 0; *diff = 0;
...@@ -289,9 +288,8 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp, ...@@ -289,9 +288,8 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
* would be adjusted twice. * would be adjusted twice.
*/ */
net = skb_net(skb);
cp->app_data = NULL; cp->app_data = NULL;
ip_vs_tcp_conn_listen(net, n_cp); ip_vs_tcp_conn_listen(n_cp);
ip_vs_conn_put(n_cp); ip_vs_conn_put(n_cp);
return ret; return ret;
} }
...@@ -320,7 +318,6 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, ...@@ -320,7 +318,6 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
union nf_inet_addr to; union nf_inet_addr to;
__be16 port; __be16 port;
struct ip_vs_conn *n_cp; struct ip_vs_conn *n_cp;
struct net *net;
/* no diff required for incoming packets */ /* no diff required for incoming packets */
*diff = 0; *diff = 0;
...@@ -413,8 +410,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, ...@@ -413,8 +410,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
/* /*
* Move tunnel to listen state * Move tunnel to listen state
*/ */
net = skb_net(skb); ip_vs_tcp_conn_listen(n_cp);
ip_vs_tcp_conn_listen(net, n_cp);
ip_vs_conn_put(n_cp); ip_vs_conn_put(n_cp);
return 1; return 1;
......
...@@ -672,9 +672,9 @@ tcp_app_conn_bind(struct ip_vs_conn *cp) ...@@ -672,9 +672,9 @@ tcp_app_conn_bind(struct ip_vs_conn *cp)
/* /*
* Set LISTEN timeout. (ip_vs_conn_put will setup timer) * Set LISTEN timeout. (ip_vs_conn_put will setup timer)
*/ */
void ip_vs_tcp_conn_listen(struct net *net, struct ip_vs_conn *cp) void ip_vs_tcp_conn_listen(struct ip_vs_conn *cp)
{ {
struct ip_vs_proto_data *pd = ip_vs_proto_data_get(net_ipvs(net), IPPROTO_TCP); struct ip_vs_proto_data *pd = ip_vs_proto_data_get(cp->ipvs, IPPROTO_TCP);
spin_lock_bh(&cp->lock); spin_lock_bh(&cp->lock);
cp->state = IP_VS_TCP_S_LISTEN; cp->state = IP_VS_TCP_S_LISTEN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment