diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_core.c | 10 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 4 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sync.c | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c index c9b83728f3ce..6a0053d91741 100644 --- a/net/netfilter/ipvs/ip_vs_core.c +++ b/net/netfilter/ipvs/ip_vs_core.c | |||
@@ -1613,15 +1613,15 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af) | |||
1613 | */ | 1613 | */ |
1614 | 1614 | ||
1615 | if (cp->flags & IP_VS_CONN_F_ONE_PACKET) | 1615 | if (cp->flags & IP_VS_CONN_F_ONE_PACKET) |
1616 | pkts = ipvs->sysctl_sync_threshold[0]; | 1616 | pkts = sysctl_sync_threshold(ipvs); |
1617 | else | 1617 | else |
1618 | pkts = atomic_add_return(1, &cp->in_pkts); | 1618 | pkts = atomic_add_return(1, &cp->in_pkts); |
1619 | 1619 | ||
1620 | if ((ipvs->sync_state & IP_VS_STATE_MASTER) && | 1620 | if ((ipvs->sync_state & IP_VS_STATE_MASTER) && |
1621 | cp->protocol == IPPROTO_SCTP) { | 1621 | cp->protocol == IPPROTO_SCTP) { |
1622 | if ((cp->state == IP_VS_SCTP_S_ESTABLISHED && | 1622 | if ((cp->state == IP_VS_SCTP_S_ESTABLISHED && |
1623 | (pkts % ipvs->sysctl_sync_threshold[1] | 1623 | (pkts % sysctl_sync_period(ipvs) |
1624 | == ipvs->sysctl_sync_threshold[0])) || | 1624 | == sysctl_sync_threshold(ipvs))) || |
1625 | (cp->old_state != cp->state && | 1625 | (cp->old_state != cp->state && |
1626 | ((cp->state == IP_VS_SCTP_S_CLOSED) || | 1626 | ((cp->state == IP_VS_SCTP_S_CLOSED) || |
1627 | (cp->state == IP_VS_SCTP_S_SHUT_ACK_CLI) || | 1627 | (cp->state == IP_VS_SCTP_S_SHUT_ACK_CLI) || |
@@ -1635,8 +1635,8 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af) | |||
1635 | else if ((ipvs->sync_state & IP_VS_STATE_MASTER) && | 1635 | else if ((ipvs->sync_state & IP_VS_STATE_MASTER) && |
1636 | (((cp->protocol != IPPROTO_TCP || | 1636 | (((cp->protocol != IPPROTO_TCP || |
1637 | cp->state == IP_VS_TCP_S_ESTABLISHED) && | 1637 | cp->state == IP_VS_TCP_S_ESTABLISHED) && |
1638 | (pkts % ipvs->sysctl_sync_threshold[1] | 1638 | (pkts % sysctl_sync_period(ipvs) |
1639 | == ipvs->sysctl_sync_threshold[0])) || | 1639 | == sysctl_sync_threshold(ipvs))) || |
1640 | ((cp->protocol == IPPROTO_TCP) && (cp->old_state != cp->state) && | 1640 | ((cp->protocol == IPPROTO_TCP) && (cp->old_state != cp->state) && |
1641 | ((cp->state == IP_VS_TCP_S_FIN_WAIT) || | 1641 | ((cp->state == IP_VS_TCP_S_FIN_WAIT) || |
1642 | (cp->state == IP_VS_TCP_S_CLOSE) || | 1642 | (cp->state == IP_VS_TCP_S_CLOSE) || |
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index c5b1234b630e..364520f66b7a 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -3569,8 +3569,8 @@ int __net_init __ip_vs_control_init(struct net *net) | |||
3569 | tbl[idx++].data = &ipvs->sysctl_cache_bypass; | 3569 | tbl[idx++].data = &ipvs->sysctl_cache_bypass; |
3570 | tbl[idx++].data = &ipvs->sysctl_expire_nodest_conn; | 3570 | tbl[idx++].data = &ipvs->sysctl_expire_nodest_conn; |
3571 | tbl[idx++].data = &ipvs->sysctl_expire_quiescent_template; | 3571 | tbl[idx++].data = &ipvs->sysctl_expire_quiescent_template; |
3572 | ipvs->sysctl_sync_threshold[0] = 3; | 3572 | ipvs->sysctl_sync_threshold[0] = DEFAULT_SYNC_THRESHOLD; |
3573 | ipvs->sysctl_sync_threshold[1] = 50; | 3573 | ipvs->sysctl_sync_threshold[1] = DEFAULT_SYNC_PERIOD; |
3574 | tbl[idx].data = &ipvs->sysctl_sync_threshold; | 3574 | tbl[idx].data = &ipvs->sysctl_sync_threshold; |
3575 | tbl[idx++].maxlen = sizeof(ipvs->sysctl_sync_threshold); | 3575 | tbl[idx++].maxlen = sizeof(ipvs->sysctl_sync_threshold); |
3576 | tbl[idx++].data = &ipvs->sysctl_nat_icmp_send; | 3576 | tbl[idx++].data = &ipvs->sysctl_nat_icmp_send; |
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index c5d13b05275a..e84987fa1bf8 100644 --- a/net/netfilter/ipvs/ip_vs_sync.c +++ b/net/netfilter/ipvs/ip_vs_sync.c | |||
@@ -650,7 +650,7 @@ control: | |||
650 | if (cp->flags & IP_VS_CONN_F_TEMPLATE) { | 650 | if (cp->flags & IP_VS_CONN_F_TEMPLATE) { |
651 | int pkts = atomic_add_return(1, &cp->in_pkts); | 651 | int pkts = atomic_add_return(1, &cp->in_pkts); |
652 | 652 | ||
653 | if (pkts % ipvs->sysctl_sync_threshold[1] != 1) | 653 | if (pkts % sysctl_sync_period(ipvs) != 1) |
654 | return; | 654 | return; |
655 | } | 655 | } |
656 | goto sloop; | 656 | goto sloop; |
@@ -794,7 +794,7 @@ static void ip_vs_proc_conn(struct net *net, struct ip_vs_conn_param *param, | |||
794 | 794 | ||
795 | if (opt) | 795 | if (opt) |
796 | memcpy(&cp->in_seq, opt, sizeof(*opt)); | 796 | memcpy(&cp->in_seq, opt, sizeof(*opt)); |
797 | atomic_set(&cp->in_pkts, ipvs->sysctl_sync_threshold[0]); | 797 | atomic_set(&cp->in_pkts, sysctl_sync_threshold(ipvs)); |
798 | cp->state = state; | 798 | cp->state = state; |
799 | cp->old_state = cp->state; | 799 | cp->old_state = cp->state; |
800 | /* | 800 | /* |