Page MenuHomeFreeBSD

Add a --sctp flag to nc.
ClosedPublic

Authored by markj on Jul 10 2020, 4:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 29, 2:22 AM
Unknown Object (File)
Mar 10 2024, 7:26 PM
Unknown Object (File)
Mar 10 2024, 7:23 PM
Unknown Object (File)
Mar 10 2024, 7:23 PM
Unknown Object (File)
Mar 7 2024, 9:28 PM
Unknown Object (File)
Feb 21 2024, 7:18 AM
Unknown Object (File)
Jan 8 2024, 11:58 PM
Unknown Object (File)
Jan 6 2024, 1:44 PM
Subscribers

Details

Summary

This is handy for testing, as we don't have a lot of SCTP-enabled code
in the base system. traceroute(6) supports SCTP but uses raw sockets.

The change just adds an SCTP mode akin to UDP mode. We could perhaps
extend this further and make use of the SCTP syscalls to exercise some
unique SCTP features, but I'm not very familiar with them. If anyone
has any suggestions I will try to implement them.

Use a long option to minimize the risk of conflicts with OpenBSD, which
has about 40 single-char option flags. For bonus points, this change
unbreaks --no-tcpopt by adding a missing case required by getopt_long().

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Jul 10 2020, 4:27 PM
markj created this revision.
This revision is now accepted and ready to land.Jul 10 2020, 4:43 PM

I'm willing to add support for SCTP features which make sense for nc over time. Just wasn't sure if this is acceptable for contributed code...

I'm willing to add support for SCTP features which make sense for nc over time. Just wasn't sure if this is acceptable for contributed code...

The impression I got from talking to a couple of folks on IRC is that upstream (OpenBSD) has already diverged quite a lot, so it is acceptable to add FreeBSD-specific code here, especially if it uses long options like --sctp so as to avoid conflicts. @delphij was the last to work on keeping us in sync, so I defer to him on this.

This revision was automatically updated to reflect the committed changes.

I'm willing to add support for SCTP features which make sense for nc over time. Just wasn't sure if this is acceptable for contributed code...

The impression I got from talking to a couple of folks on IRC is that upstream (OpenBSD) has already diverged quite a lot, so it is acceptable to add FreeBSD-specific code here, especially if it uses long options like --sctp so as to avoid conflicts. @delphij was the last to work on keeping us in sync, so I defer to him on this.

Thanks for the information. Since OpenBSD has no SCTP support, I thought it is hard to go via upstream. But if additions are acceptable, I'll add some features. Will put @delphij on the corresponding reviews.