aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2010-09-01 18:19:14 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-02 13:04:18 -0400
commit8ed2163ff3b6abc5143d46dea73e523b22a6f987 (patch)
treecbcb876724f7b793ea733f774db0d0c0c8ed2e06 /net
parent95f4b45bc688b03107f5452ccda29496fc1b4ecf (diff)
ipvs: use pkts for SCTP too
Use correctly the in_pkts packet counter also for SCTP Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/ipvs/ip_vs_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index edbfb96b935e..b7ce5b441b38 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1383,8 +1383,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb,
1383 if (af == AF_INET && (ip_vs_sync_state & IP_VS_STATE_MASTER) && 1383 if (af == AF_INET && (ip_vs_sync_state & IP_VS_STATE_MASTER) &&
1384 cp->protocol == IPPROTO_SCTP) { 1384 cp->protocol == IPPROTO_SCTP) {
1385 if ((cp->state == IP_VS_SCTP_S_ESTABLISHED && 1385 if ((cp->state == IP_VS_SCTP_S_ESTABLISHED &&
1386 (atomic_read(&cp->in_pkts) % 1386 (pkts % sysctl_ip_vs_sync_threshold[1]
1387 sysctl_ip_vs_sync_threshold[1]
1388 == sysctl_ip_vs_sync_threshold[0])) || 1387 == sysctl_ip_vs_sync_threshold[0])) ||
1389 (cp->old_state != cp->state && 1388 (cp->old_state != cp->state &&
1390 ((cp->state == IP_VS_SCTP_S_CLOSED) || 1389 ((cp->state == IP_VS_SCTP_S_CLOSED) ||
@@ -1395,7 +1394,8 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb,
1395 } 1394 }
1396 } 1395 }
1397 1396
1398 if (af == AF_INET && 1397 /* Keep this block last: TCP and others with pp->num_states <= 1 */
1398 else if (af == AF_INET &&
1399 (ip_vs_sync_state & IP_VS_STATE_MASTER) && 1399 (ip_vs_sync_state & IP_VS_STATE_MASTER) &&
1400 (((cp->protocol != IPPROTO_TCP || 1400 (((cp->protocol != IPPROTO_TCP ||
1401 cp->state == IP_VS_TCP_S_ESTABLISHED) && 1401 cp->state == IP_VS_TCP_S_ESTABLISHED) &&