HomeFreeBSD

Various cleanups to the management of multiple TCP stacks.

Description

Various cleanups to the management of multiple TCP stacks.

  • 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.

Reviewed by: rrs
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D19152

Details

Provenance
jhbAuthored on
Reviewer
rrs
Differential Revision
D19152: Various cleanups to the management of multiple TCP stacks.
Parents
rS344631: Update review requests for bhyve.
Branches
Unknown
Tags
Unknown