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>
This commit is contained in:
committed by
Simon Horman
parent
bba54de5bd
commit
c6c96c1883
@@ -978,6 +978,8 @@ struct netns_ipvs {
|
||||
int sysctl_sync_sock_size;
|
||||
int sysctl_cache_bypass;
|
||||
int sysctl_expire_nodest_conn;
|
||||
int sysctl_sloppy_tcp;
|
||||
int sysctl_sloppy_sctp;
|
||||
int sysctl_expire_quiescent_template;
|
||||
int sysctl_sync_threshold[2];
|
||||
unsigned int sysctl_sync_refresh_period;
|
||||
@@ -1020,6 +1022,8 @@ struct netns_ipvs {
|
||||
#define DEFAULT_SYNC_THRESHOLD 3
|
||||
#define DEFAULT_SYNC_PERIOD 50
|
||||
#define DEFAULT_SYNC_VER 1
|
||||
#define DEFAULT_SLOPPY_TCP 0
|
||||
#define DEFAULT_SLOPPY_SCTP 0
|
||||
#define DEFAULT_SYNC_REFRESH_PERIOD (0U * HZ)
|
||||
#define DEFAULT_SYNC_RETRIES 0
|
||||
#define IPVS_SYNC_WAKEUP_RATE 8
|
||||
@@ -1056,6 +1060,16 @@ static inline int sysctl_sync_ver(struct netns_ipvs *ipvs)
|
||||
return ipvs->sysctl_sync_ver;
|
||||
}
|
||||
|
||||
static inline int sysctl_sloppy_tcp(struct netns_ipvs *ipvs)
|
||||
{
|
||||
return ipvs->sysctl_sloppy_tcp;
|
||||
}
|
||||
|
||||
static inline int sysctl_sloppy_sctp(struct netns_ipvs *ipvs)
|
||||
{
|
||||
return ipvs->sysctl_sloppy_sctp;
|
||||
}
|
||||
|
||||
static inline int sysctl_sync_ports(struct netns_ipvs *ipvs)
|
||||
{
|
||||
return ACCESS_ONCE(ipvs->sysctl_sync_ports);
|
||||
@@ -1109,6 +1123,16 @@ static inline int sysctl_sync_ver(struct netns_ipvs *ipvs)
|
||||
return DEFAULT_SYNC_VER;
|
||||
}
|
||||
|
||||
static inline int sysctl_sloppy_tcp(struct netns_ipvs *ipvs)
|
||||
{
|
||||
return DEFAULT_SLOPPY_TCP;
|
||||
}
|
||||
|
||||
static inline int sysctl_sloppy_sctp(struct netns_ipvs *ipvs)
|
||||
{
|
||||
return DEFAULT_SLOPPY_SCTP;
|
||||
}
|
||||
|
||||
static inline int sysctl_sync_ports(struct netns_ipvs *ipvs)
|
||||
{
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user