Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Mar 2023 21:28:32 GMT
From:      Richard Scheffenegger <rscheff@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 2be7e3df7275 - stable/13 - tcp: Make TCP PCAP buffer properly configurable.
Message-ID:  <202303032128.323LSWG8009181@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by rscheff:

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

commit 2be7e3df72758f46c853c08cd4e35f4e5fb0b187
Author:     Richard Scheffenegger <rscheff@FreeBSD.org>
AuthorDate: 2023-02-28 18:57:30 +0000
Commit:     Richard Scheffenegger <rscheff@FreeBSD.org>
CommitDate: 2023-03-02 07:36:21 +0000

    tcp: Make TCP PCAP buffer properly configurable.
    
    Reviewed By:            tuexen, cc, #transport
    MFC after:              3 days
    Sponsored by:           NetApp, Inc.
    Differential Revision:  https://reviews.freebsd.org/D38824
    
    (cherry picked from commit 399a5655e6edf69a63f1c37e66fdad19dcfdb5cf)
---
 sys/netinet/tcp_usrreq.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 0706e55f439b..0b9e1841bc0e 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -2257,7 +2257,8 @@ unlock_and_done:
 
 			INP_WLOCK_RECHECK(inp);
 			if (optval >= 0)
-				tcp_pcap_set_sock_max(TCP_PCAP_OUT ?
+				tcp_pcap_set_sock_max(
+					(sopt->sopt_name == TCP_PCAP_OUT) ?
 					&(tp->t_outpkts) : &(tp->t_inpkts),
 					optval);
 			else
@@ -2494,7 +2495,8 @@ unhold:
 #ifdef TCPPCAP
 		case TCP_PCAP_OUT:
 		case TCP_PCAP_IN:
-			optval = tcp_pcap_get_sock_max(TCP_PCAP_OUT ?
+			optval = tcp_pcap_get_sock_max(
+					(sopt->sopt_name == TCP_PCAP_OUT) ?
 					&(tp->t_outpkts) : &(tp->t_inpkts));
 			INP_WUNLOCK(inp);
 			error = sooptcopyout(sopt, &optval, sizeof optval);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303032128.323LSWG8009181>