summaryrefslogtreecommitdiff
path: root/sbin/pfctl
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2010-01-12 16:21:25 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2010-01-12 16:21:25 +0000
commit0500365299fa162c353e28bfb1e5b48fdf3fbad9 (patch)
treeb7ddebafa7700c7295066d6a6572b4bac01601a0 /sbin/pfctl
parent7d7e96330e48ba8c8244f3023d4dbef5d0b1eb37 (diff)
Only print route specs with @if notation if there is an IP address.
Diffstat (limited to 'sbin/pfctl')
-rw-r--r--sbin/pfctl/pfctl_parser.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c
index a4c9df8b370..8c902591479 100644
--- a/sbin/pfctl/pfctl_parser.c
+++ b/sbin/pfctl/pfctl_parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.c,v 1.258 2010/01/12 15:49:43 mcbride Exp $ */
+/* $OpenBSD: pfctl_parser.c,v 1.259 2010/01/12 16:21:24 mcbride Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -401,8 +401,11 @@ print_pool(struct pf_pool *pool, u_int16_t p1, u_int16_t p2,
sa_family_t af, int id, int verbose)
{
if (pool->ifname[0]) {
- print_addr(&pool->addr, af, verbose);
- printf("@%s", pool->ifname);
+ if (!PF_AZERO(&pool->addr.v.a.addr, af)) {
+ print_addr(&pool->addr, af, verbose);
+ printf("@");
+ }
+ printf("%s", pool->ifname);
} else
print_addr(&pool->addr, af, verbose);
switch (id) {