summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorKjell Wooding <kjell@cvs.openbsd.org>1999-12-17 06:17:09 +0000
committerKjell Wooding <kjell@cvs.openbsd.org>1999-12-17 06:17:09 +0000
commit4079660d028fd04257f79612e62b4e10cd975afe (patch)
tree1a3daed7c047fa6eadb26bb92a21c19a59895a62 /sbin
parentb44956e30be4e6576489a64e05343069fd07d608 (diff)
Update to Darren Reed's IPFilter 3.3.5
Fixes: realaudio proxy issues, "log level" printing, and source address for icmp replies (was reversed). Thoughtfully submitted by techs@obfuscation.org
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipf/parse.c41
1 files changed, 37 insertions, 4 deletions
diff --git a/sbin/ipf/parse.c b/sbin/ipf/parse.c
index 6e5d9588087..f088e213604 100644
--- a/sbin/ipf/parse.c
+++ b/sbin/ipf/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.28 1999/12/16 07:38:45 kjell Exp $ */
+/* $OpenBSD: parse.c,v 1.29 1999/12/17 06:17:08 kjell Exp $ */
/*
* Copyright (C) 1993-1998 by Darren Reed.
*
@@ -42,7 +42,7 @@
#if !defined(lint)
static const char sccsid[] = "@(#)parse.c 1.44 6/5/96 (C) 1993-1996 Darren Reed";
-static const char rcsid[] = "@(#)$Id: parse.c,v 1.28 1999/12/16 07:38:45 kjell Exp $";
+static const char rcsid[] = "@(#)$Id: parse.c,v 1.29 1999/12/17 06:17:08 kjell Exp $";
#endif
extern struct ipopt_names ionames[], secclass[];
@@ -268,6 +268,39 @@ int linenum;
fil.fr_flags |= FR_LOGORBLOCK;
cpp++;
}
+ if (!strcasecmp(*cpp, "level")) {
+ int fac, pri;
+ char *s;
+
+ fac = 0;
+ pri = 0;
+ cpp++;
+ s = index(*cpp, '.');
+ if (s) {
+ *s++ = '\0';
+ fac = fac_findname(*cpp);
+ if (fac == -1) {
+ fprintf(stderr, "%d: %s %s\n", linenum,
+ "Unknown facility", *cpp);
+ return NULL;
+ }
+ pri = pri_findname(s);
+ if (pri == -1) {
+ fprintf(stderr, "%d: %s %s\n", linenum,
+ "Unknown priority", s);
+ return NULL;
+ }
+ } else {
+ pri = pri_findname(*cpp);
+ if (pri == -1) {
+ fprintf(stderr, "%d: %s %s\n", linenum,
+ "Unknown priority", *cpp);
+ return NULL;
+ }
+ }
+ fil.fr_loglevel = fac|pri;
+ cpp++;
+ }
}
if (!strcasecmp("quick", *cpp)) {
@@ -1391,9 +1424,9 @@ struct frentry *fp;
if (u == NULL)
u = "!!!";
if (*s)
- printf("%s.%s ", s, u);
+ printf("level %s.%s ", s, u);
else
- printf("%s ", u);
+ printf("level %s ", u);
}
}