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, Jun 21, 1:11 AM
Unknown Object (File)
Tue, Jun 11, 8:35 PM
Unknown Object (File)
Apr 17 2024, 7:12 PM
Unknown Object (File)
Apr 16 2024, 8:54 PM
Unknown Object (File)
Apr 16 2024, 4:18 PM
Unknown Object (File)
Apr 14 2024, 5:35 PM
Unknown Object (File)
Apr 12 2024, 5:16 PM
Unknown Object (File)
Apr 9 2024, 7:21 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.