From 8c4700315e53a74b69cf3ade06a960683974c706 Mon Sep 17 00:00:00 2001 From: glebius Date: Mon, 24 Jun 2013 09:57:41 +0000 Subject: [PATCH] Merge r250039: Remove useless ifdef KLD_MODULE from dummynet module unload path. This fixes panic on unload. Reported by: pho git-svn-id: svn://svn.freebsd.org/base/stable/9@252159 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/netpfil/ipfw/ip_dummynet.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummynet.c index 3c41ffda8..b6950211e 100644 --- a/sys/netpfil/ipfw/ip_dummynet.c +++ b/sys/netpfil/ipfw/ip_dummynet.c @@ -2169,7 +2169,6 @@ ip_dn_init(void) getmicrouptime(&dn_cfg.prev_t); } -#ifdef KLD_MODULE static void ip_dn_destroy(int last) { @@ -2193,7 +2192,6 @@ ip_dn_destroy(int last) DN_LOCK_DESTROY(); } -#endif /* KLD_MODULE */ static int dummynet_modevent(module_t mod, int type, void *data) @@ -2209,13 +2207,8 @@ dummynet_modevent(module_t mod, int type, void *data) ip_dn_io_ptr = dummynet_io; return 0; } else if (type == MOD_UNLOAD) { -#if !defined(KLD_MODULE) - printf("dummynet statically compiled, cannot unload\n"); - return EINVAL ; -#else ip_dn_destroy(1 /* last */); return 0; -#endif } else return EOPNOTSUPP; } -- 2.45.0