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)
Dec 20 2023, 1:25 AM
Unknown Object (File)
Dec 10 2023, 5:22 PM
Unknown Object (File)
Nov 15 2023, 11:55 AM
Unknown Object (File)
Sep 21 2023, 4:56 AM
Unknown Object (File)
Sep 8 2023, 1:57 AM
Unknown Object (File)
Sep 8 2023, 1:54 AM
Unknown Object (File)
Sep 8 2023, 1:52 AM
Unknown Object (File)
Sep 2 2023, 12:45 AM
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