diff options
author | amurai <amurai@FreeBSD.org> | 1995-02-22 06:44:03 +0000 |
---|---|---|
committer | amurai <amurai@FreeBSD.org> | 1995-02-22 06:44:03 +0000 |
commit | 9b728823fed8534f2539b24d3772aaa99f10d040 (patch) | |
tree | d82c5304dd3d815e59c93e5bc1acbfe7cc040711 /usr.sbin/ppp/filter.c | |
parent | bd131fa64feb65416008a5a58badd759fe6e7220 (diff) | |
download | FreeBSD-src-9b728823fed8534f2539b24d3772aaa99f10d040.zip FreeBSD-src-9b728823fed8534f2539b24d3772aaa99f10d040.tar.gz |
The 'set ifilter'/'set ofilter' commands accept a syntax containing
IP addresses and/or protocol+port, but in the case where both are
supplied, it happily accepts the command but ignores the proto+port
It also attempts to handle the case where the second IP address
is omitted, but this doesn't work.
Reviewed by: amurai@spec.co.jp
Submitted by: Andrew.Gordon@net-tel.co.uk
Diffstat (limited to 'usr.sbin/ppp/filter.c')
-rw-r--r-- | usr.sbin/ppp/filter.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/ppp/filter.c b/usr.sbin/ppp/filter.c index 4240b6e..a89913a 100644 --- a/usr.sbin/ppp/filter.c +++ b/usr.sbin/ppp/filter.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id:$ + * $Id: filter.c,v 1.1.1.1 1995/01/31 06:29:57 amurai Exp $ * * TODO: Shoud send ICMP error message when we discard packets. */ @@ -316,7 +316,7 @@ struct filterent *ofp; } } - fp->proto = proto = ParseProto(argc, argv); + proto = ParseProto(argc, argv); if (proto == P_NONE) { if (ParseAddr(argc, argv, &fp->saddr, &fp->smask, &fp->swidth)) { argc--; argv++; @@ -326,9 +326,9 @@ struct filterent *ofp; argc--; argv++; } proto = ParseProto(argc, argv); - if (proto) { - argc--; argv++; - } + } + if (proto) { + argc--; argv++; } } else { printf("Address/protocol expected.\n"); @@ -339,6 +339,7 @@ struct filterent *ofp; } val = 1; + fp->proto = proto; switch (proto) { case P_TCP: |