diff options
| author | Julian Anastasov <ja@ssi.bg> | 2012-04-24 16:46:38 -0400 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-05-08 13:38:31 -0400 |
| commit | cdcc5e905d59026fbf2e7f74f9cc834203b6207b (patch) | |
| tree | 3f8c6440384a2d0e753d35f51e344269953a986a /include/linux | |
| parent | 882a844bd5b3ffa35e059f21ee920cc113985a89 (diff) | |
ipvs: always update some of the flags bits in backup
As the goal is to mirror the inactconns/activeconns
counters in the backup server, make sure the cp->flags are
updated even if cp is still not bound to dest. If cp->flags
are not updated ip_vs_bind_dest will rely only on the initial
flags when updating the counters. To avoid mistakes and
complicated checks for protocol state rely only on the
IP_VS_CONN_F_INACTIVE bit when updating the counters.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Tested-by: Aleksey Chudov <aleksey.chudov@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ip_vs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/ip_vs.h b/include/linux/ip_vs.h index be0ef3df4acb..8a2d438dc499 100644 --- a/include/linux/ip_vs.h +++ b/include/linux/ip_vs.h | |||
| @@ -89,6 +89,7 @@ | |||
| 89 | #define IP_VS_CONN_F_TEMPLATE 0x1000 /* template, not connection */ | 89 | #define IP_VS_CONN_F_TEMPLATE 0x1000 /* template, not connection */ |
| 90 | #define IP_VS_CONN_F_ONE_PACKET 0x2000 /* forward only one packet */ | 90 | #define IP_VS_CONN_F_ONE_PACKET 0x2000 /* forward only one packet */ |
| 91 | 91 | ||
| 92 | /* Initial bits allowed in backup server */ | ||
| 92 | #define IP_VS_CONN_F_BACKUP_MASK (IP_VS_CONN_F_FWD_MASK | \ | 93 | #define IP_VS_CONN_F_BACKUP_MASK (IP_VS_CONN_F_FWD_MASK | \ |
| 93 | IP_VS_CONN_F_NOOUTPUT | \ | 94 | IP_VS_CONN_F_NOOUTPUT | \ |
| 94 | IP_VS_CONN_F_INACTIVE | \ | 95 | IP_VS_CONN_F_INACTIVE | \ |
| @@ -97,6 +98,10 @@ | |||
| 97 | IP_VS_CONN_F_TEMPLATE \ | 98 | IP_VS_CONN_F_TEMPLATE \ |
| 98 | ) | 99 | ) |
| 99 | 100 | ||
| 101 | /* Bits allowed to update in backup server */ | ||
| 102 | #define IP_VS_CONN_F_BACKUP_UPD_MASK (IP_VS_CONN_F_INACTIVE | \ | ||
| 103 | IP_VS_CONN_F_SEQ_MASK) | ||
| 104 | |||
| 100 | /* Flags that are not sent to backup server start from bit 16 */ | 105 | /* Flags that are not sent to backup server start from bit 16 */ |
| 101 | #define IP_VS_CONN_F_NFCT (1 << 16) /* use netfilter conntrack */ | 106 | #define IP_VS_CONN_F_NFCT (1 << 16) /* use netfilter conntrack */ |
| 102 | 107 | ||
