Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Apr 2013 06:11:19 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r250039 - head/sys/netpfil/ipfw
Message-ID:  <201304290611.r3T6BJw0063677@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Mon Apr 29 06:11:19 2013
New Revision: 250039
URL: http://svnweb.freebsd.org/changeset/base/250039

Log:
  Remove useless ifdef KLD_MODULE from dummynet module unload path. This
  fixes panic on unload.
  
  Reported by:	pho

Modified:
  head/sys/netpfil/ipfw/ip_dummynet.c

Modified: head/sys/netpfil/ipfw/ip_dummynet.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_dummynet.c	Mon Apr 29 04:38:43 2013	(r250038)
+++ head/sys/netpfil/ipfw/ip_dummynet.c	Mon Apr 29 06:11:19 2013	(r250039)
@@ -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
 		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;
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304290611.r3T6BJw0063677>