git: efb04fb404b2 - main - sctp: improve consistency of acc and ccc handling in snd buffer

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Fri, 04 Aug 2023 21:04:56 UTC
The branch main has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=efb04fb404b240a99c618e49174cd6260217edaa

commit efb04fb404b240a99c618e49174cd6260217edaa
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2023-08-04 06:32:25 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2023-08-04 06:32:25 +0000

    sctp: improve consistency of acc and ccc handling in snd buffer
    
    Don't clear the counters for the socket snd buffer when
    shutdown(..., SHUT_WR) or shutdown(..., SHUT_RDWR) is called.
    This was causing the system to panic() when SCTP pf tests were
    running.
    
    Reported by:    dchagin, kp
    MFC after:      1 week
---
 sys/netinet/sctp_usrreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c
index d603ef5efcd6..aa957ffa9f96 100644
--- a/sys/netinet/sctp_usrreq.c
+++ b/sys/netinet/sctp_usrreq.c
@@ -838,7 +838,6 @@ sctp_flush(struct socket *so, int how)
 		SOCK_LOCK(so);
 		KASSERT(!SOLISTENING(so),
 		    ("sctp_flush: called on listening socket %p", so));
-		SCTP_SB_CLEAR(so->so_snd);
 		SOCK_UNLOCK(so);
 	}
 	return (0);