diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2005-03-06 02:40:09 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2005-03-06 02:40:09 +0000 |
commit | 1cef10f687b0da1a6546c67b3f2c17e48b5d7ecf (patch) | |
tree | b3687a35e8a8a71ad056fdccaf945215365d7b6e /sbin/pfctl/parse.y | |
parent | 7b4abd7b291ef3bc08f89a2f469fdea0f052f977 (diff) |
print "set skip on" with -v in such a way that the output is valid input
syntax, instead of the cryptic hex flags output.
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r-- | sbin/pfctl/parse.y | 10 |
1 files changed, 9 insertions, 1 deletions
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 ! <interface> 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); |