Page MenuHomeFreeBSD

tcpsso: fix when used without -i option
ClosedPublic

Authored by tuexen on Jan 6 2024, 10:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 18, 9:38 AM
Unknown Object (File)
Sep 10 2024, 8:19 AM
Unknown Object (File)
Sep 9 2024, 2:12 AM
Unknown Object (File)
Sep 8 2024, 10:41 AM
Unknown Object (File)
Sep 8 2024, 6:20 AM
Unknown Object (File)
Sep 3 2024, 11:41 AM
Unknown Object (File)
Sep 2 2024, 3:47 AM
Unknown Object (File)
Jul 31 2024, 9:22 AM
Subscribers

Details

Summary

It looks like that since fdb987bebddf05e15a5af840379c7715a94aec1c it is not possible anymore to use the inp_next iterator
for bound but unconnected sockets. In the TCP case, these are listening sockets.
This breaks tcpsso when used without the -i option.
Fallback to iterate through all endpoints, which is not as performant as it was, but un-breaks tcpsso.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tuexen edited the summary of this revision. (Show Details)

Could you please add a regression test which uses tcpsso (or at least this sysctl interface), so that this kind of bug can be caught quickly next time?

Could you please add a regression test which uses tcpsso (or at least this sysctl interface), so that this kind of bug can be caught quickly next time?

Are there examples for tests of programs in /usr/sbin/?

Could you please add a regression test which uses tcpsso (or at least this sysctl interface), so that this kind of bug can be caught quickly next time?

Are there examples for tests of programs in /usr/sbin/?

find usr.sbin/ -name tests turns up some examples. There are some in usr/share/examples/tests as well.

This revision is now accepted and ready to land.Jan 8 2024, 2:31 PM

Could you please add a regression test which uses tcpsso (or at least this sysctl interface), so that this kind of bug can be caught quickly next time?

Are there examples for tests of programs in /usr/sbin/?

find usr.sbin/ -name tests turns up some examples. There are some in usr/share/examples/tests as well.

Thanks for the pointers. Will figure out something an bring it up as a separate review/commit.

This revision was automatically updated to reflect the committed changes.