Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/ipf Import IP Filter 3.3.8
details: https://anonhg.NetBSD.org/src/rev/adf2ff3fb63b
branches: trunk
changeset: 481542:adf2ff3fb63b
user: veego <veego%NetBSD.org@localhost>
date: Tue Feb 01 20:11:02 2000 +0000
description:
Import IP Filter 3.3.8
diffstat:
dist/ipf/BNF | 3 ++-
dist/ipf/ip_lfil.c | 14 +++++++-------
dist/ipf/ip_sfil.c | 10 ++++++----
dist/ipf/ipt.c | 6 ++++--
4 files changed, 19 insertions(+), 14 deletions(-)
diffs (143 lines):
diff -r 35cb44202789 -r adf2ff3fb63b dist/ipf/BNF
--- a/dist/ipf/BNF Tue Feb 01 20:05:54 2000 +0000
+++ b/dist/ipf/BNF Tue Feb 01 20:11:02 2000 +0000
@@ -53,7 +53,8 @@
"routersol" | decnumber .
icmp-code = decumber | "net-unr" | "host-unr" | "proto-unr" | "port-unr" |
"needfrag" | "srcfail" | "net-unk" | "host-unk" | "isolate" |
- "net-prohib" | "host-prohib" | "net-tos" | "host-tos" .
+ "net-prohib" | "host-prohib" | "net-tos" | "host-tos" |
+ "filter-prohib" | "host-preced" | "cutoff-preced" .
optlist = "nop" | "rr" | "zsu" | "mtup" | "mtur" | "encode" | "ts" | "tr" |
"sec" | "lsrr" | "e-sec" | "cipso" | "satid" | "ssrr" | "addext" |
"visa" | "imitd" | "eip" | "finn" .
diff -r 35cb44202789 -r adf2ff3fb63b dist/ipf/ip_lfil.c
--- a/dist/ipf/ip_lfil.c Tue Feb 01 20:05:54 2000 +0000
+++ b/dist/ipf/ip_lfil.c Tue Feb 01 20:11:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_lfil.c,v 1.1.1.1 1999/12/11 22:23:58 veego Exp $ */
+/* $NetBSD: ip_lfil.c,v 1.1.1.2 2000/02/01 20:11:16 veego Exp $ */
/*
* Copyright (C) 1993-1998 by Darren Reed.
@@ -8,7 +8,7 @@
* to the original author and the contributors.
*/
#if !defined(lint)
-static const char rcsid[] = "@(#)Id: ip_lfil.c,v 2.1 1999/08/04 17:29:57 darrenr Exp";
+static const char rcsid[] = "@(#)Id: ip_lfil.c,v 2.1.2.1 2000/01/16 10:13:02 darrenr Exp";
#endif
#if defined(KERNEL) && !defined(_KERNEL)
@@ -65,7 +65,7 @@
static int nifs = 0;
#endif
-int ipl_inited = 0;
+int fr_running = 0;
int ipl_unreach = ICMP_UNREACH_FILTER;
u_long ipl_frouteok[2] = {0, 0};
@@ -100,12 +100,12 @@
char *defpass;
int s;
- if (ipl_inited || (fr_checkp == fr_precheck)) {
+ if (fr_running || (fr_checkp == fr_precheck)) {
printk("IP Filter: already initialized\n");
return EBUSY;
}
- ipl_inited = 1;
+ fr_running = 1;
bzero((char *)frcache, sizeof(frcache));
bzero((char *)nat_table, sizeof(nat_table));
fr_savep = fr_checkp;
@@ -140,7 +140,7 @@
{
int s, i = FR_INQUE|FR_OUTQUE;
- if (!ipl_inited)
+ if (!fr_running)
{
printk("IP Filter: not initialized\n");
return 0;
@@ -148,7 +148,7 @@
fr_checkp = fr_savep;
i = frflush(IPL_LOGIPF, i);
- ipl_inited = 0;
+ fr_running = 0;
ipfr_unload();
ip_natunload();
diff -r 35cb44202789 -r adf2ff3fb63b dist/ipf/ip_sfil.c
--- a/dist/ipf/ip_sfil.c Tue Feb 01 20:05:54 2000 +0000
+++ b/dist/ipf/ip_sfil.c Tue Feb 01 20:11:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_sfil.c,v 1.1.1.1 1999/12/11 22:23:58 veego Exp $ */
+/* $NetBSD: ip_sfil.c,v 1.1.1.2 2000/02/01 20:11:19 veego Exp $ */
/*
* Copyright (C) 1993-1998 by Darren Reed.
@@ -11,7 +11,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "%W% %G% (C) 1993-1995 Darren Reed";
-static const char rcsid[] = "@(#)Id: ip_sfil.c,v 2.1.2.5 1999/12/11 05:31:10 darrenr Exp";
+static const char rcsid[] = "@(#)Id: ip_sfil.c,v 2.1.2.6 2000/01/16 10:12:44 darrenr Exp";
#endif
#include <sys/types.h>
@@ -500,13 +500,15 @@
}
if (!f) {
- if (req != SIOCINAFR || req != SIOCINIFR)
+ if (req != SIOCINAFR && req != SIOCINIFR)
while ((f = *ftail))
ftail = &f->fr_next;
else {
- if (fp->fr_hits)
+ if (fp->fr_hits) {
+ ftail = fprev;
while (--fp->fr_hits && (f = *ftail))
ftail = &f->fr_next;
+ }
f = NULL;
}
}
diff -r 35cb44202789 -r adf2ff3fb63b dist/ipf/ipt.c
--- a/dist/ipf/ipt.c Tue Feb 01 20:05:54 2000 +0000
+++ b/dist/ipf/ipt.c Tue Feb 01 20:11:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipt.c,v 1.1.1.1 1999/12/11 22:23:59 veego Exp $ */
+/* $NetBSD: ipt.c,v 1.1.1.2 2000/02/01 20:11:23 veego Exp $ */
/*
* Copyright (C) 1993-1998 by Darren Reed.
@@ -57,7 +57,7 @@
#if !defined(lint)
static const char sccsid[] = "@(#)ipt.c 1.19 6/3/96 (C) 1993-1996 Darren Reed";
-static const char rcsid[] = "@(#)Id: ipt.c,v 2.1 1999/08/04 17:30:08 darrenr Exp";
+static const char rcsid[] = "@(#)Id: ipt.c,v 2.1.2.1 2000/01/24 14:49:11 darrenr Exp";
#endif
extern char *optarg;
@@ -66,6 +66,7 @@
extern struct ifnet *get_unit __P((char *));
extern void init_ifp __P((void));
extern ipnat_t *natparse __P((char *, int));
+extern int fr_running;
int opts = 0;
int main __P((int, char *[]));
@@ -136,6 +137,7 @@
nat_init();
fr_stateinit();
initparse();
+ fr_running = 1;
if (rules) {
char line[513], *s;
Home |
Main Index |
Thread Index |
Old Index