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.
It's not quite that risky, because if_tunnel_check_nesting() checks if the last tunnel hop was this struct ifnet, so if users configure a loop the packet will be discarded immediately, not when it hits the nesting limit.
We do still need the limit, because users might configure a large number of different nested tunnels, which could still run us out of stack space, but that's harder to do by accident.