aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexander Frolkin <avf@eldamar.org.uk>2013-06-13 03:56:15 -0400
committerSimon Horman <horms@verge.net.au>2013-06-26 05:01:46 -0400
commitc6c96c188336b2b95d5f14facd101f1e4165a9d3 (patch)
treedf08ce0348f8471f9e48487a9ab775237190648e /include
parentbba54de5bdd107d3841b560f1a9cb0ed06e79533 (diff)
ipvs: sloppy TCP and SCTP
This adds support for sloppy TCP and SCTP modes to IPVS. When enabled (sysctls net.ipv4.vs.sloppy_tcp and net.ipv4.vs.sloppy_sctp), allows IPVS to create connection state on any packet, not just a TCP SYN (or SCTP INIT). This allows connections to fail over from one IPVS director to another mid-flight. Signed-off-by: Alexander Frolkin <avf@eldamar.org.uk> Signed-off-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.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index f5faf859876e..95860dfdfbe3 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -978,6 +978,8 @@ struct netns_ipvs {
978 int sysctl_sync_sock_size; 978 int sysctl_sync_sock_size;
979 int sysctl_cache_bypass; 979 int sysctl_cache_bypass;
980 int sysctl_expire_nodest_conn; 980 int sysctl_expire_nodest_conn;
981 int sysctl_sloppy_tcp;
982 int sysctl_sloppy_sctp;
981 int sysctl_expire_quiescent_template; 983 int sysctl_expire_quiescent_template;
982 int sysctl_sync_threshold[2]; 984 int sysctl_sync_threshold[2];
983 unsigned int sysctl_sync_refresh_period; 985 unsigned int sysctl_sync_refresh_period;
@@ -1020,6 +1022,8 @@ struct netns_ipvs {
1020#define DEFAULT_SYNC_THRESHOLD 3 1022#define DEFAULT_SYNC_THRESHOLD 3
1021#define DEFAULT_SYNC_PERIOD 50 1023#define DEFAULT_SYNC_PERIOD 50
1022#define DEFAULT_SYNC_VER 1 1024#define DEFAULT_SYNC_VER 1
1025#define DEFAULT_SLOPPY_TCP 0
1026#define DEFAULT_SLOPPY_SCTP 0
1023#define DEFAULT_SYNC_REFRESH_PERIOD (0U * HZ) 1027#define DEFAULT_SYNC_REFRESH_PERIOD (0U * HZ)
1024#define DEFAULT_SYNC_RETRIES 0 1028#define DEFAULT_SYNC_RETRIES 0
1025#define IPVS_SYNC_WAKEUP_RATE 8 1029#define IPVS_SYNC_WAKEUP_RATE 8
@@ -1056,6 +1060,16 @@ static inline int sysctl_sync_ver(struct netns_ipvs *ipvs)
1056 return ipvs->sysctl_sync_ver; 1060 return ipvs->sysctl_sync_ver;
1057} 1061}
1058 1062
1063static inline int sysctl_sloppy_tcp(struct netns_ipvs *ipvs)
1064{
1065 return ipvs->sysctl_sloppy_tcp;
1066}
1067
1068static inline int sysctl_sloppy_sctp(struct netns_ipvs *ipvs)
1069{
1070 return ipvs->sysctl_sloppy_sctp;
1071}
1072
1059static inline int sysctl_sync_ports(struct netns_ipvs *ipvs) 1073static inline int sysctl_sync_ports(struct netns_ipvs *ipvs)
1060{ 1074{
1061 return ACCESS_ONCE(ipvs->sysctl_sync_ports); 1075 return ACCESS_ONCE(ipvs->sysctl_sync_ports);
@@ -1109,6 +1123,16 @@ static inline int sysctl_sync_ver(struct netns_ipvs *ipvs)
1109 return DEFAULT_SYNC_VER; 1123 return DEFAULT_SYNC_VER;
1110} 1124}
1111 1125
1126static inline int sysctl_sloppy_tcp(struct netns_ipvs *ipvs)
1127{
1128 return DEFAULT_SLOPPY_TCP;
1129}
1130
1131static inline int sysctl_sloppy_sctp(struct netns_ipvs *ipvs)
1132{
1133 return DEFAULT_SLOPPY_SCTP;
1134}
1135
1112static inline int sysctl_sync_ports(struct netns_ipvs *ipvs) 1136static inline int sysctl_sync_ports(struct netns_ipvs *ipvs)
1113{ 1137{
1114 return 1; 1138 return 1;