Commit 423b5595 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Simon Horman

ipvs: Pass ipvs not net to ip_vs_random_drop_entry

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 0f34d54b
...@@ -1258,7 +1258,7 @@ const char *ip_vs_state_name(__u16 proto, int state); ...@@ -1258,7 +1258,7 @@ 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 net *net, 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 net *net); void ip_vs_random_dropentry(struct netns_ipvs *ipvs);
int ip_vs_conn_init(void); int ip_vs_conn_init(void);
void ip_vs_conn_cleanup(void); void ip_vs_conn_cleanup(void);
......
...@@ -1239,7 +1239,7 @@ static inline int todrop_entry(struct ip_vs_conn *cp) ...@@ -1239,7 +1239,7 @@ static inline int todrop_entry(struct ip_vs_conn *cp)
} }
/* Called from keventd and must protect itself from softirqs */ /* Called from keventd and must protect itself from softirqs */
void ip_vs_random_dropentry(struct net *net) void ip_vs_random_dropentry(struct netns_ipvs *ipvs)
{ {
int idx; int idx;
struct ip_vs_conn *cp, *cp_c; struct ip_vs_conn *cp, *cp_c;
...@@ -1255,7 +1255,7 @@ void ip_vs_random_dropentry(struct net *net) ...@@ -1255,7 +1255,7 @@ void ip_vs_random_dropentry(struct net *net)
if (cp->flags & IP_VS_CONN_F_TEMPLATE) if (cp->flags & IP_VS_CONN_F_TEMPLATE)
/* connection template */ /* connection template */
continue; continue;
if (!net_eq(cp->ipvs->net, net)) if (cp->ipvs != ipvs)
continue; continue;
if (cp->protocol == IPPROTO_TCP) { if (cp->protocol == IPPROTO_TCP) {
switch(cp->state) { switch(cp->state) {
......
...@@ -228,7 +228,7 @@ static void defense_work_handler(struct work_struct *work) ...@@ -228,7 +228,7 @@ static void defense_work_handler(struct work_struct *work)
update_defense_level(ipvs); update_defense_level(ipvs);
if (atomic_read(&ipvs->dropentry)) if (atomic_read(&ipvs->dropentry))
ip_vs_random_dropentry(ipvs->net); ip_vs_random_dropentry(ipvs);
schedule_delayed_work(&ipvs->defense_work, DEFENSE_TIMER_PERIOD); schedule_delayed_work(&ipvs->defense_work, DEFENSE_TIMER_PERIOD);
} }
#endif #endif
......
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