Page MenuHomeFreeBSD

Several small TCP related fixes for getsockopt()
ClosedPublic

Authored by tuexen on Sep 8 2016, 3:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 15, 12:23 AM
Unknown Object (File)
Tue, Sep 23, 10:04 AM
Unknown Object (File)
Wed, Sep 17, 4:47 PM
Unknown Object (File)
Aug 31 2025, 5:48 PM
Unknown Object (File)
Aug 31 2025, 4:25 PM
Unknown Object (File)
Aug 30 2025, 10:26 AM
Unknown Object (File)
Aug 29 2025, 11:41 PM
Unknown Object (File)
Aug 20 2025, 4:21 PM
Subscribers

Details

Reviewers
hiren
rrs
jtl
Group Reviewers
transport
Summary

When using getsockopt(..., IPPROTO_TCP, TCP_INFO, ..., ...) the flag TCPI_OPT_ECN in tcpi_options is not set when ECN support has been successfully negotiated. This patch fixes this.

When using getsockopt(..., IPPROTO_TCP, TCP_KEEPINIT, ..., ...) a value of 0 is reported when the default value inherited from the sysctl variable net.inet.tcp.keepinit is used. This patch ensure that always the value used is reported.

When using getsockopt(..., IPPROTO_TCP, TCP_KEEPINTVL, ..., ...) a value of 0 is reported when the default value inherited from the sysctl variable net.inet.tcp.keepintvl is used. This patch ensure that always the value used is reported.

When using getsockopt(..., IPPROTO_TCP, TCP_KEEPIDLE, ..., ...) a value of 0 is reported when the default value inherited from the sysctl variable net.inet.tcp.keepidle is used. This patch ensure that always the value used is reported.

When using getsockopt(..., IPPROTO_TCP, TCP_KEEPCNT, ..., ...) a value of 0 is reported when the default value inherited from the sysctl variable net.inet.tcp.keepcnt is used. This patch ensure that always the value used is reported.

Test Plan

Using packetdrill test scripts to ensure that always the value actually used is reported. No matter if it is the default value or a value set by the user via a corresponding setsockopt() operation.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 5111
Build 5203: CI src buildJenkins

Event Timeline

tuexen retitled this revision from to Several small TCP related fixes for getsockopt().
tuexen updated this object.
tuexen edited the test plan for this revision. (Show Details)
tuexen added reviewers: transport, rrs.
tuexen set the repository for this revision to rS FreeBSD src repository - subversion.
rrs edited edge metadata.
This revision is now accepted and ready to land.Sep 8 2016, 5:31 PM
jtl added a reviewer: jtl.
hiren added a reviewer: hiren.
hiren added a subscriber: hiren.

Thanks for the cleanup.