mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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
This commit is contained in:
parent
9f83fca886
commit
399a5655e6
1 changed files with 4 additions and 2 deletions
|
|
@ -2320,7 +2320,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
|
||||
|
|
@ -2561,7 +2562,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue