mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 20:53:53 +08:00
ipvs: drop SCTP connections depending on state
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@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
parent
61e7c420b4
commit
acaac5d8bb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user