Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dist/pf/net Do not auto unload pf if it's enabled.
details: https://anonhg.NetBSD.org/src/rev/be08a9d7e70b
branches: trunk
changeset: 753872:be08a9d7e70b
user: ahoka <ahoka%NetBSD.org@localhost>
date: Tue Apr 13 01:02:43 2010 +0000
description:
Do not auto unload pf if it's enabled.
diffstat:
sys/dist/pf/net/pf_ioctl.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r 1368bfa19ef9 -r be08a9d7e70b sys/dist/pf/net/pf_ioctl.c
--- a/sys/dist/pf/net/pf_ioctl.c Mon Apr 12 23:20:18 2010 +0000
+++ b/sys/dist/pf/net/pf_ioctl.c Tue Apr 13 01:02:43 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pf_ioctl.c,v 1.38 2010/04/12 13:57:38 ahoka Exp $ */
+/* $NetBSD: pf_ioctl.c,v 1.39 2010/04/13 01:02:43 ahoka Exp $ */
/* $OpenBSD: pf_ioctl.c,v 1.182 2007/06/24 11:17:13 mcbride Exp $ */
/*
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pf_ioctl.c,v 1.38 2010/04/12 13:57:38 ahoka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pf_ioctl.c,v 1.39 2010/04/13 01:02:43 ahoka Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -3367,6 +3367,13 @@
pfdetach();
pflogdetach();
return devsw_detach(NULL, &pf_cdevsw);
+ case MODULE_CMD_AUTOUNLOAD:
+ /* Do not auto unload pf if it's enabled. */
+ if (pf_status.running) {
+ return EBUSY;
+ } else {
+ return ENOTTY;
+ }
default:
return ENOTTY;
}
Home |
Main Index |
Thread Index |
Old Index