![]() |
lvs-devel
|
| To: | Simon Horman <horms@xxxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH net-next 3/3] ipvs: drop SCTP connections depending on state |
| Cc: | lvs-devel@xxxxxxxxxxxxxxx |
| From: | Julian Anastasov <ja@xxxxxx> |
| Date: | Tue, 18 Jun 2013 10:08:08 +0300 |
Drop SCTP connections under load (dropentry context) depending
on the protocol state, just like for TCP: INIT conns are
dropped immediately, established are dropped randomly while
connections in progress or shutdown are skipped.
Signed-off-by: Julian Anastasov <ja@xxxxxx>
---
net/netfilter/ipvs/ip_vs_conn.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index c8c52a9..4c8e5c0 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -1231,6 +1231,18 @@ void ip_vs_random_dropentry(struct net *net)
default:
continue;
}
+ } else if (cp->protocol == IPPROTO_SCTP) {
+ switch (cp->state) {
+ case IP_VS_SCTP_S_INIT1:
+ case IP_VS_SCTP_S_INIT:
+ break;
+ case IP_VS_SCTP_S_ESTABLISHED:
+ if (todrop_entry(cp))
+ break;
+ continue;
+ default:
+ continue;
+ }
} else {
if (!todrop_entry(cp))
continue;
--
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH net-next 1/3] ipvs: SCTP ports should be writable in ICMP packets, Julian Anastasov |
|---|---|
| Next by Date: | [PATCH net-next 0/3] SCTP Changes for IPVS, Julian Anastasov |
| Previous by Thread: | [PATCH net-next 1/3] ipvs: SCTP ports should be writable in ICMP packets, Julian Anastasov |
| Next by Thread: | [PATCH net-next 2/3] ipvs: replace the SCTP state machine, Julian Anastasov |
| Indexes: | [Date] [Thread] [Top] [All Lists] |