summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHans Schillstrom <hans.schillstrom@ericsson.com>2011-01-03 14:44:59 +0100
committerSimon Horman <horms@verge.net.au>2011-01-13 10:30:28 +0900
commitf6340ee0c6b9498ec918a7bb2f44e20abb8b2833 (patch)
tree46e0f99416479f31bbd8093e18c360171e86fd59 /include
parenta0840e2e165a370ca24a59545e564e9881a55891 (diff)
downloadlinux-3.10-f6340ee0c6b9498ec918a7bb2f44e20abb8b2833.tar.gz
linux-3.10-f6340ee0c6b9498ec918a7bb2f44e20abb8b2833.tar.bz2
linux-3.10-f6340ee0c6b9498ec918a7bb2f44e20abb8b2833.zip
IPVS: netns, defense work timer.
This patch makes defense work timer per name-space, A net ptr had to be added to the ipvs struct, since it's needed by defense_work_handler. [ horms@verge.net.au: Use cancel_delayed_work_sync() instead of cancel_rearming_delayed_work(). Found during merge conflict resoliution ] Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include')
-rw-r--r--include/net/ip_vs.h2
-rw-r--r--include/net/netns/ip_vs.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index af9acf44e40..fbe660f9587 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -877,7 +877,7 @@ extern const char * ip_vs_state_name(__u16 proto, int state);
extern void ip_vs_tcp_conn_listen(struct net *net, struct ip_vs_conn *cp);
extern int ip_vs_check_template(struct ip_vs_conn *ct);
-extern void ip_vs_random_dropentry(void);
+extern void ip_vs_random_dropentry(struct net *net);
extern int ip_vs_conn_init(void);
extern void ip_vs_conn_cleanup(void);
diff --git a/include/net/netns/ip_vs.h b/include/net/netns/ip_vs.h
index c4b1abf258e..41332619142 100644
--- a/include/net/netns/ip_vs.h
+++ b/include/net/netns/ip_vs.h
@@ -71,6 +71,7 @@ struct netns_ipvs {
int num_services; /* no of virtual services */
/* 1/rate drop and drop-entry variables */
+ struct delayed_work defense_work; /* Work handler */
int drop_rate;
int drop_counter;
atomic_t dropentry;
@@ -129,6 +130,8 @@ struct netns_ipvs {
/* multicast interface name */
char master_mcast_ifn[IP_VS_IFNAME_MAXLEN];
char backup_mcast_ifn[IP_VS_IFNAME_MAXLEN];
+ /* net name space ptr */
+ struct net *net; /* Needed by timer routines */
};
#endif /* IP_VS_H_ */