Page MenuHomeFreeBSD

Various cleanups to the management of multiple TCP stacks.
ClosedPublic

Authored by jhb on Feb 11 2019, 11:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 23, 7:34 PM
Unknown Object (File)
Wed, Oct 23, 5:45 PM
Unknown Object (File)
Oct 5 2024, 11:42 PM
Unknown Object (File)
Oct 5 2024, 12:02 PM
Unknown Object (File)
Oct 2 2024, 10:19 PM
Unknown Object (File)
Oct 2 2024, 4:05 PM
Unknown Object (File)
Oct 1 2024, 4:24 AM
Unknown Object (File)
Sep 30 2024, 12:28 PM
Subscribers

Details

Summary

I could split this up into separate commits, or do them all as one merged
commit. I've only done very simple testing of these (boot and pass
traffic with the default stack). Feel free to add more reviewers.

Use strlcpy() with sizeof() instead of strncpy().

Simplify initialization of TCP functions structures.

init_tcp_functions() was already called before the first call to register
a stack. Just inline the work in the SYSINIT and remove the racy helper
variable. Instead, KASSERT that the rw lock is initialized when registering
a stack.

Protect the default stack via a direct pointer comparison.

The default stack uses the name "freebsd" instead of "default" so this
protection wasn't working for the default stack anyway.

Diff Detail

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