Date: Mon, 26 Feb 1996 09:25:49 +0100 (MET) From: Mikael Hybsch <micke@dynas.se> To: freebsd-hackers@freefall.freebsd.org Subject: PATCH: Minor fixes to /usr/sbin/ppp (FreeBSD-stable version) Message-ID: <Pine.SOL.3.91.960226091103.5699A-100000@spirit.dynas.se>
next in thread | raw e-mail | index | archive | help
The current version doesn't allow you to use the "estab" keyword in the
filter rules without specifying a source or destination port.
The diff for filter.c fixes that.
In filter.h, the constant OP_LT should really be 3, otherwise
"show ifilter" will index element 4 in the array opnames[0-3].
diff -ur ORG/filter.c ./filter.c
--- ORG/filter.c Sun Feb 25 19:07:05 1996
+++ ./filter.c Sun Feb 25 19:47:51 1996
@@ -206,12 +206,6 @@
filterdata.opt.srcop = filterdata.opt.dstop = A_NONE;
return(1);
}
- if (argc < 3) {
-#ifdef notdef
- printf("bad udp syntax.\n");
-#endif
- return(0);
- }
if (argc >= 3 && STREQ(*argv, "src")) {
filterdata.opt.srcop = ParseOp(argv[1]);
if (filterdata.opt.srcop == OP_NONE) {
diff -ur ORG/filter.h ./filter.h
--- ORG/filter.h Sun Feb 25 19:46:48 1996
+++ ./filter.h Sun Feb 25 19:46:58 1996
@@ -48,7 +48,7 @@
#define OP_NONE 0
#define OP_EQ 1
#define OP_GT 2
-#define OP_LT 4
+#define OP_LT 3
struct filterent {
int action; /* Filtering action */
--
Mikael Hybsch Email: micke@dynas.se
DynaSoft, Dynamic Software AB Phone: +46-8-615 84 00
Hammarby Fabriksv 13, Box 92058 Fax: +46-8-641 92 00
S-120 06 STOCKHOLM, SWEDEN
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.3.91.960226091103.5699A-100000>
