diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-06-18 11:04:15 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-06-18 11:04:15 +0000 |
commit | 7c793a55781282ac2a5ddf35f64ed3515e705244 (patch) | |
tree | af772dcc7c0e982bdcd96775913b6b06a76d5634 /sbin/pfctl | |
parent | 08135bce0074808edcadf9fb30acaf67ba2f1300 (diff) |
when expanding the $srcaddr/$dstaddr label macros and the address is actually
a table refernence, don't print nonsense but the table name.
found by claudio jeker, fix by me, agreement by cedric
Diffstat (limited to 'sbin/pfctl')
-rw-r--r-- | sbin/pfctl/parse.y | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index f236f05baa3..c97171b1ccd 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.390 2003/06/09 11:14:46 mcbride Exp $ */ +/* $OpenBSD: parse.y,v 1.391 2003/06/18 11:04:14 henning Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -3194,6 +3194,8 @@ expand_label_addr(const char *name, char *label, sa_family_t af, if (strstr(label, name) != NULL) { if (h->addr.type == PF_ADDR_DYNIFTL) snprintf(tmp, sizeof(tmp), "(%s)", h->addr.v.ifname); + else if (h->addr.type == PF_ADDR_TABLE) + snprintf(tmp, sizeof(tmp), "<%s>", h->addr.v.tblname); else if (!af || (PF_AZERO(&h->addr.v.a.addr, af) && PF_AZERO(&h->addr.v.a.mask, af))) snprintf(tmp, sizeof(tmp), "any"); |