From 98f6a62499a31a1aff010e23009e856a474cf8bc Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sat, 28 Aug 2004 15:24:53 +0000 Subject: [PATCH] Mark Netgraph TTY, KAME IPSEC, and IPX/SPX as requiring Giant for correct operation using NET_NEEDS_GIANT(). This will result in a boot-time restoration of Giant-enabled network operation, or run-time warning on dynamic load (applicable only to the Netgraph component). Additional components will likely need to be marked with this in the future. --- sys/netgraph/ng_tty.c | 2 ++ sys/netinet6/ipsec.c | 2 ++ sys/netipx/ipx.c | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c index bd341da51639..9ae20a0612b8 100644 --- a/sys/netgraph/ng_tty.c +++ b/sys/netgraph/ng_tty.c @@ -75,6 +75,8 @@ #include #include +NET_NEEDS_GIANT("ng_tty"); + /* Misc defs */ #define MAX_MBUFQ 3 /* Max number of queued mbufs */ #define NGT_HIWATER 400 /* High water mark on output */ diff --git a/sys/netinet6/ipsec.c b/sys/netinet6/ipsec.c index 13d2feb667a3..6f3dd5c32e87 100644 --- a/sys/netinet6/ipsec.c +++ b/sys/netinet6/ipsec.c @@ -110,6 +110,8 @@ int ipsec_debug = 1; int ipsec_debug = 0; #endif +NET_NEEDS_GIANT("ipsec"); + struct ipsecstat ipsecstat; int ip4_ah_cleartos = 1; int ip4_ah_offsetmask = 0; /* maybe IP_DF? */ diff --git a/sys/netipx/ipx.c b/sys/netipx/ipx.c index af7ba49cd289..840f802fae49 100644 --- a/sys/netipx/ipx.c +++ b/sys/netipx/ipx.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -50,6 +51,11 @@ __FBSDID("$FreeBSD$"); #include #include +NET_NEEDS_GIANT("ipx"); + +/* + * XXXRW: Requires synchronization. + */ struct ipx_ifaddr *ipx_ifaddr; static void ipx_ifscrub(struct ifnet *ifp, struct ipx_ifaddr *ia);