From 1cef10f687b0da1a6546c67b3f2c17e48b5d7ecf Mon Sep 17 00:00:00 2001 From: Daniel Hartmeier Date: Sun, 6 Mar 2005 02:40:09 +0000 Subject: print "set skip on" with -v in such a way that the output is valid input syntax, instead of the cryptic hex flags output. --- sbin/pfctl/parse.y | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sbin/pfctl/parse.y') diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 4487dc9c79e..7b480ba59f5 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.479 2005/02/27 15:08:39 dhartmei Exp $ */ +/* $OpenBSD: parse.y,v 1.480 2005/03/06 02:40:08 dhartmei Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -4510,11 +4510,17 @@ expand_skip_interface(struct node_if *interfaces) if (!interfaces || (!interfaces->next && !interfaces->not && !strcmp(interfaces->ifname, "none"))) { + if (pf->opts & PF_OPT_VERBOSE) + printf("set skip on none\n"); errs = pfctl_set_interface_flags(pf, "", PFI_IFLAG_SKIP, 0); return (errs); } + if (pf->opts & PF_OPT_VERBOSE) + printf("set skip on {"); LOOP_THROUGH(struct node_if, interface, interfaces, + if (pf->opts & PF_OPT_VERBOSE) + printf(" %s", interface->ifname); if (interface->not) { yyerror("skip on ! is not supported"); errs++; @@ -4522,6 +4528,8 @@ expand_skip_interface(struct node_if *interfaces) errs += pfctl_set_interface_flags(pf, interface->ifname, PFI_IFLAG_SKIP, 1); ); + if (pf->opts & PF_OPT_VERBOSE) + printf(" }\n"); FREE_LIST(struct node_if, interfaces); -- cgit v1.2.3