summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Wooding <kjell@cvs.openbsd.org>1999-12-17 07:50:07 +0000
committerKjell Wooding <kjell@cvs.openbsd.org>1999-12-17 07:50:07 +0000
commit15cad8c790b06c68703fd6a0d3403109bcab4712 (patch)
treeb812c33f77cad2ba3dbbc836f16b0aabf3b8664f
parent01ecb9e4924da7e6e5e8ce66a6edf4b677e16ef6 (diff)
Patch to fix ipmon -F. /dev/ipnat and /dev/ipstate now handle SIOCIPFFB.
from darrenr@pobox.com
-rw-r--r--sys/netinet/ip_nat.c12
-rw-r--r--sys/netinet/ip_state.c12
2 files changed, 20 insertions, 4 deletions
diff --git a/sys/netinet/ip_nat.c b/sys/netinet/ip_nat.c
index 25feccd54fa..ffd708579ba 100644
--- a/sys/netinet/ip_nat.c
+++ b/sys/netinet/ip_nat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_nat.c,v 1.24 1999/12/17 06:17:08 kjell Exp $ */
+/* $OpenBSD: ip_nat.c,v 1.25 1999/12/17 07:50:05 kjell Exp $ */
/*
* Copyright (C) 1995-1998 by Darren Reed.
*
@@ -10,7 +10,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)ip_nat.c 1.11 6/5/96 (C) 1995 Darren Reed";
-static const char rcsid[] = "@(#)$Id: ip_nat.c,v 1.24 1999/12/17 06:17:08 kjell Exp $";
+static const char rcsid[] = "@(#)$Id: ip_nat.c,v 1.25 1999/12/17 07:50:05 kjell Exp $";
#endif
#if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL)
@@ -323,6 +323,14 @@ int mode;
switch (cmd)
{
+#ifdef IPFILTER_LOG
+ case SIOCIPFFB :
+ if (!(mode & FWRITE))
+ error = EPERM;
+ else
+ *(int *)data = ipflog_clear(IPL_LOGNAT);
+ break;
+#endif
case SIOCADNAT :
if (!(mode & FWRITE)) {
error = EPERM;
diff --git a/sys/netinet/ip_state.c b/sys/netinet/ip_state.c
index 94d3376f256..3b30b7fe37d 100644
--- a/sys/netinet/ip_state.c
+++ b/sys/netinet/ip_state.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_state.c,v 1.14 1999/12/15 05:20:23 kjell Exp $ */
+/* $OpenBSD: ip_state.c,v 1.15 1999/12/17 07:50:06 kjell Exp $ */
/*
* Copyright (C) 1995-1998 by Darren Reed.
*
@@ -8,7 +8,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)ip_state.c 1.8 6/5/96 (C) 1993-1995 Darren Reed";
-static const char rcsid[] = "@(#)$Id: ip_state.c,v 1.14 1999/12/15 05:20:23 kjell Exp $";
+static const char rcsid[] = "@(#)$Id: ip_state.c,v 1.15 1999/12/17 07:50:06 kjell Exp $";
#endif
#include <sys/errno.h>
@@ -228,6 +228,14 @@ int mode;
} else
error = EINVAL;
break;
+#ifdef IPFILTER_LOG
+ case SIOCIPFFB :
+ if (!(mode & FWRITE))
+ error = EPERM;
+ else
+ *(int *)data = ipflog_clear(IPL_LOGSTATE);
+ break;
+#endif
case SIOCGIPST :
IWCOPY((caddr_t)fr_statetstats(), data, sizeof(ips_stat_t));
break;