When setting a SOL_SOCKET-level socket option, the TCP handler refers to the IP handler, which only handles SO_SETFIB and SO_MAX_PACING_RATE. So call sosetopt(), which handles all SOL_SOCKET-level options.
We could call sosetopt() always, but that would do a INP_WUNLOCK() followed up by a INP_WLOCK() in cases where the level is not SOL_SOCKET.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Since this is from tcpsso - just curious if it wouldn't be possible to call setsockopt from within that utility after getting the socket from the inpcb id?
Comment Actions
tcpsso does not get the socket. It is the kernel in sysctl_setsockopt(), which can access the socket. It already does so to add a reference to it.