summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/filter.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-11-12 18:47:30 +0000
committerbrian <brian@FreeBSD.org>1997-11-12 18:47:30 +0000
commitd99cc94f138fb47191d70c0d7b7241428a189ef0 (patch)
tree42e568b5f953a265b74e4c676aae7e57462482dd /usr.sbin/ppp/filter.c
parent4feb2f9c7555b299d299f3c7ff031623987361ac (diff)
downloadFreeBSD-src-d99cc94f138fb47191d70c0d7b7241428a189ef0.zip
FreeBSD-src-d99cc94f138fb47191d70c0d7b7241428a189ef0.tar.gz
Return correct value from "set loopback".
Output "set ?filter deny host|port" rules correctly with show ?filter. Submitted by: Dave Bodenstab <imdave@mcs.net>
Diffstat (limited to 'usr.sbin/ppp/filter.c')
-rw-r--r--usr.sbin/ppp/filter.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/ppp/filter.c b/usr.sbin/ppp/filter.c
index 121ae04..baa45ef 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.16 1997/10/26 01:02:34 brian Exp $
+ * $Id: filter.c,v 1.17 1997/11/09 14:18:38 brian Exp $
*
* TODO: Shoud send ICMP error message when we discard packets.
*/
@@ -434,7 +434,13 @@ ShowFilter(struct filterent * fp)
for (n = 0; n < MAXFILTERS; n++, fp++) {
if (fp->action != A_NONE) {
- fprintf(VarTerm, "%2d %s", n, actname[fp->action]);
+ fprintf(VarTerm, "%2d %s", n, actname[fp->action & (A_PERMIT|A_DENY)]);
+ if (fp->action & A_UHOST)
+ fprintf(VarTerm, "host ");
+ else if (fp->action & A_UPORT)
+ fprintf(VarTerm, "port ");
+ else
+ fprintf(VarTerm, " ");
fprintf(VarTerm, "%s/%d ", inet_ntoa(fp->saddr), fp->swidth);
fprintf(VarTerm, "%s/%d ", inet_ntoa(fp->daddr), fp->dwidth);
if (fp->proto) {
OpenPOWER on IntegriCloud