summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormcbride <mcbride@openbsd.org>2003-01-18 04:45:59 +0000
committermcbride <mcbride@openbsd.org>2003-01-18 04:45:59 +0000
commit553cc111f9cf0e0676dbfa21d537e1d95c39aa7b (patch)
tree29a9b189f68787436e61ff6e9fdc0976fa952a27
parentset stack size for threads, the default is too small for this test. (diff)
downloadwireguard-openbsd-553cc111f9cf0e0676dbfa21d537e1d95c39aa7b.tar.xz
wireguard-openbsd-553cc111f9cf0e0676dbfa21d537e1d95c39aa7b.zip
Add missing token string and assignment to make static-port work for real.
Diff and report courtesy of mpech@ and form@ ok dhartmei@
-rw-r--r--sbin/pfctl/parse.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 9e22cb42d5d..260f02bc882 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.291 2003/01/17 12:53:52 camield Exp $ */
+/* $OpenBSD: parse.y,v 1.292 2003/01/18 04:45:59 mcbride Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -2267,6 +2267,9 @@ natrule : no NAT interface af proto fromto redirpool pooltype staticport
memcpy(&nat.rpool.key, $8.key,
sizeof(struct pf_poolhashkey));
+ if ($9 != NULL)
+ nat.rpool.opts |= PF_POOL_STATICPORT;
+
expand_nat(&nat, $3, $5, $6.src.host, $6.src.port,
$6.dst.host, $6.dst.port,
$7 == NULL ? NULL : $7->host);
@@ -3592,6 +3595,7 @@ lookup(char *s)
{ "set", SET},
{ "source-hash", SOURCEHASH},
{ "state", STATE},
+ { "static-port", STATICPORT},
{ "table", TABLE},
{ "tbrsize", TBRSIZE},
{ "timeout", TIMEOUT},