From dbc7eddfa5650674631dc18adcf60ed0dfea8a32 Mon Sep 17 00:00:00 2001 From: brian Date: Mon, 26 Jul 1999 11:15:11 +0000 Subject: Fix an off-by-one error and correct the man page WRT clearing filters. Submitted by: Peter Jeremy PR: 12437 --- usr.sbin/ppp/filter.c | 4 ++-- usr.sbin/ppp/ppp.8 | 8 ++++++-- usr.sbin/ppp/ppp.8.m4 | 8 ++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/ppp/filter.c b/usr.sbin/ppp/filter.c index 024cd91..aefb43a 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: filter.c,v 1.29 1999/05/31 23:57:36 brian Exp $ + * $Id: filter.c,v 1.30 1999/06/23 16:48:21 brian Exp $ * * TODO: Shoud send ICMP error message when we discard packets. */ @@ -306,7 +306,7 @@ Parse(struct ipcp *ipcp, int argc, char const *const *argv, struct filterent filterdata; val = strtol(*argv, &wp, 0); - if (*argv == wp || val > MAXFILTERS) { + if (*argv == wp || val >= MAXFILTERS) { log_Printf(LogWARN, "Parse: invalid filter number.\n"); return (0); } diff --git a/usr.sbin/ppp/ppp.8 b/usr.sbin/ppp/ppp.8 index 87b115e..8217cb8 100644 --- a/usr.sbin/ppp/ppp.8 +++ b/usr.sbin/ppp/ppp.8 @@ -1,4 +1,4 @@ -.\" $Id: ppp.8,v 1.177 1999/06/23 16:48:24 brian Exp $ +.\" $Id: ppp.8,v 1.178 1999/07/17 10:33:57 brian Exp $ .Dd 20 September 1995 .nr XX \w'\fC00' .Os FreeBSD @@ -1424,7 +1424,7 @@ or is a numeric value between .Sq 0 and -.Sq 19 +.Sq 39 specifying the rule number. Rules are specified in numeric order according to .Ar rule-no , but only if rule @@ -1438,6 +1438,10 @@ or .Sq deny . If a given packet matches the rule, the associated action is taken immediately. +.Ar Action +can also be specified as +.Sq clear +to clear the action associated with that particular rule. .It .Op Ar src_addr Ns Op / Ns Ar width and diff --git a/usr.sbin/ppp/ppp.8.m4 b/usr.sbin/ppp/ppp.8.m4 index 87b115e..8217cb8 100644 --- a/usr.sbin/ppp/ppp.8.m4 +++ b/usr.sbin/ppp/ppp.8.m4 @@ -1,4 +1,4 @@ -.\" $Id: ppp.8,v 1.177 1999/06/23 16:48:24 brian Exp $ +.\" $Id: ppp.8,v 1.178 1999/07/17 10:33:57 brian Exp $ .Dd 20 September 1995 .nr XX \w'\fC00' .Os FreeBSD @@ -1424,7 +1424,7 @@ or is a numeric value between .Sq 0 and -.Sq 19 +.Sq 39 specifying the rule number. Rules are specified in numeric order according to .Ar rule-no , but only if rule @@ -1438,6 +1438,10 @@ or .Sq deny . If a given packet matches the rule, the associated action is taken immediately. +.Ar Action +can also be specified as +.Sq clear +to clear the action associated with that particular rule. .It .Op Ar src_addr Ns Op / Ns Ar width and -- cgit v1.1