When the TCP_LOG option is used to enable logging on a listening socket, inherit this if the listener is not auto selected and does not have a log id set.
Details
Details
Run the following packetdrill script:
0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0.000 setsockopt(3, IPPROTO_TCP, TCP_LOG, [TCP_LOG_STATE_CONTINUAL], 4) = 0 +0.000 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0.000 bind(3, ..., ...) = 0 +0.000 listen(3, 1) = 0 +0.000 < S 0:0(0) win 32767 <mss 1460,sackOK,eol,eol> +0.000 > S. 0:0(0) ack 1 win 65535 <mss 1460,sackOK,eol,eol> +0.050 < . 1:1(0) ack 1 win 32767 +0.000 accept(3, ..., ...) = 4 +0.000 getsockopt(3, IPPROTO_TCP, TCP_LOG, [TCP_LOG_STATE_CONTINUAL], [4]) = 0 +0.000 getsockopt(4, IPPROTO_TCP, TCP_LOG, [TCP_LOG_STATE_CONTINUAL], [4]) = 0 +0.000 close(3) = 0 +0.000 close(4) = 0 +0.000 > F. 1:1(0) ack 1 win 65535 +0.050 < F. 1:1(0) ack 2 win 32767 +0.000 > . 2:2(0) ack 2 win 65535
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Please revise the SUMMARY part: "if the listener is not auto selected or has a log id set." => "if the listener is not auto selected or does not have a log id set."
sys/netinet/tcp_syncache.c | ||
---|---|---|
1030 | Looks in default t_logstate is TCP_LOG_STATE_OFF, so check this first can save further checks in default. |