summaryrefslogtreecommitdiffstats
path: root/sys/netpfil
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2013-04-29 06:11:19 +0000
committerglebius <glebius@FreeBSD.org>2013-04-29 06:11:19 +0000
commitccddbf936506740e6edc9eb571bc98fe440d0249 (patch)
tree1aff36fe23fb5da84de48200ec8105ae0a9d4512 /sys/netpfil
parent2da1028f21b927feefa5fb1ef59b2fcd58aeaffd (diff)
downloadFreeBSD-src-ccddbf936506740e6edc9eb571bc98fe440d0249.zip
FreeBSD-src-ccddbf936506740e6edc9eb571bc98fe440d0249.tar.gz
Remove useless ifdef KLD_MODULE from dummynet module unload path. This
fixes panic on unload. Reported by: pho
Diffstat (limited to 'sys/netpfil')
-rw-r--r--sys/netpfil/ipfw/ip_dummynet.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummynet.c
index 509aeb7..1f25af5 100644
--- a/sys/netpfil/ipfw/ip_dummynet.c
+++ b/sys/netpfil/ipfw/ip_dummynet.c
@@ -2170,7 +2170,6 @@ ip_dn_init(void)
getmicrouptime(&dn_cfg.prev_t);
}
-#ifdef KLD_MODULE
static void
ip_dn_destroy(int last)
{
@@ -2194,7 +2193,6 @@ ip_dn_destroy(int last)
DN_LOCK_DESTROY();
}
-#endif /* KLD_MODULE */
static int
dummynet_modevent(module_t mod, int type, void *data)
@@ -2210,13 +2208,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;
}
OpenPOWER on IntegriCloud