summaryrefslogtreecommitdiff
path: root/sbin/pfctl/pfctl_parser.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2002-10-14 12:58:29 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2002-10-14 12:58:29 +0000
commitddf9a76a6ac99f77e2d616c4494271e8414a7c68 (patch)
tree6f24af57e08272cd4c30bee5051c8de12beb4a9a /sbin/pfctl/pfctl_parser.c
parent6726798190bfe92e3616e969f4fa2612a2720bcb (diff)
Allow one to specify a netblock in a binat rule:
binat on fxp0 from 192.168.0.32/27 to any -> 10.0.7.128/27 Both the network mask on the source and redirect addresses MUST be the same, and it works by essentially combining the network section of the redirect address with the host section of the source address. from ryan ok dhartmei@
Diffstat (limited to 'sbin/pfctl/pfctl_parser.c')
-rw-r--r--sbin/pfctl/pfctl_parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c
index 5b7f23cdbfe..6c1d84a9a5c 100644
--- a/sbin/pfctl/pfctl_parser.c
+++ b/sbin/pfctl/pfctl_parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.c,v 1.99 2002/10/07 13:23:46 henning Exp $ */
+/* $OpenBSD: pfctl_parser.c,v 1.100 2002/10/14 12:58:28 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -462,7 +462,7 @@ print_binat(struct pf_binat *b)
printf("proto %u ", b->proto);
}
printf("from ");
- print_addr(&b->saddr, NULL, b->af);
+ print_addr(&b->saddr, &b->smask, b->af);
printf(" ");
printf("to ");
if (!PF_AZERO(&b->daddr.addr, b->af) || !PF_AZERO(&b->dmask, b->af)) {
@@ -474,7 +474,7 @@ print_binat(struct pf_binat *b)
printf("any ");
if (!b->no) {
printf("-> ");
- print_addr(&b->raddr, NULL, b->af);
+ print_addr(&b->raddr, &b->rmask, b->af);
}
printf("\n");
}