diff options
author | bz <bz@FreeBSD.org> | 2010-04-29 11:52:42 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2010-04-29 11:52:42 +0000 |
commit | 0a90ef17283bc848eee90c3bdd5bec3fcc1bc879 (patch) | |
tree | e6f9695e24617b291f2a8f0b1f388eda2e605549 /sys/netinet6/scope6.c | |
parent | 043deeb56455e1129861bf93ec57f03b90200344 (diff) | |
download | FreeBSD-src-0a90ef17283bc848eee90c3bdd5bec3fcc1bc879.zip FreeBSD-src-0a90ef17283bc848eee90c3bdd5bec3fcc1bc879.tar.gz |
MFP4: @176978-176982, 176984, 176990-176994, 177441
"Whitspace" churn after the VIMAGE/VNET whirls.
Remove the need for some "init" functions within the network
stack, like pim6_init(), icmp_init() or significantly shorten
others like ip6_init() and nd6_init(), using static initialization
again where possible and formerly missed.
Move (most) variables back to the place they used to be before the
container structs and VIMAGE_GLOABLS (before r185088) and try to
reduce the diff to stable/7 and earlier as good as possible,
to help out-of-tree consumers to update from 6.x or 7.x to 8 or 9.
This also removes some header file pollution for putatively
static global variables.
Revert VIMAGE specific changes in ipfilter::ip_auth.c, that are
no longer needed.
Reviewed by: jhb
Discussed with: rwatson
Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
MFC after: 6 days
Diffstat (limited to 'sys/netinet6/scope6.c')
-rw-r--r-- | sys/netinet6/scope6.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c index cced5e30..8189d87 100644 --- a/sys/netinet6/scope6.c +++ b/sys/netinet6/scope6.c @@ -50,6 +50,11 @@ __FBSDID("$FreeBSD$"); #include <netinet6/ip6_var.h> #include <netinet6/scope6_var.h> +#ifdef ENABLE_DEFAULT_SCOPE +VNET_DEFINE(int, ip6_use_defzone) = 1; +#else +VNET_DEFINE(int, ip6_use_defzone) = 0; +#endif /* * The scope6_lock protects the global sid default stored in @@ -62,8 +67,6 @@ static struct mtx scope6_lock; #define SCOPE6_LOCK_ASSERT() mtx_assert(&scope6_lock, MA_OWNED) static VNET_DEFINE(struct scope6_id, sid_default); -VNET_DEFINE(int, ip6_use_defzone); - #define V_sid_default VNET(sid_default) #define SID(ifp) \ @@ -73,11 +76,6 @@ void scope6_init(void) { -#ifdef ENABLE_DEFAULT_SCOPE - V_ip6_use_defzone = 1; -#else - V_ip6_use_defzone = 0; -#endif bzero(&V_sid_default, sizeof(V_sid_default)); if (!IS_DEFAULT_VNET(curvnet)) |