diff options
author | 2010-01-12 16:21:24 +0000 | |
---|---|---|
committer | 2010-01-12 16:21:24 +0000 | |
commit | a2f57b9fd95ec475c94d23967ccb1b5ee97ab94f (patch) | |
tree | da8eab1065e0f92c65e5f20a7c7f528d4284afc1 | |
parent | no nat is no longer legal (diff) | |
download | wireguard-openbsd-a2f57b9fd95ec475c94d23967ccb1b5ee97ab94f.tar.xz wireguard-openbsd-a2f57b9fd95ec475c94d23967ccb1b5ee97ab94f.zip |
Only print route specs with @if notation if there is an IP address.
-rw-r--r-- | sbin/pfctl/pfctl_parser.c | 9 |
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) { |