diff options
author | tobhe <tobhe@cvs.openbsd.org> | 2020-11-01 09:50:25 +0000 |
---|---|---|
committer | tobhe <tobhe@cvs.openbsd.org> | 2020-11-01 09:50:25 +0000 |
commit | 4ca065f2634f9127bbdfecd3485ea4f6378e9d41 (patch) | |
tree | f4936e36e678ee99fc374cacb1a2f97cb433b2e8 /sbin/iked | |
parent | f0da4ada21e54ee7219d1673fd112507977e9772 (diff) |
Add 'dynamic' keyword to configure flows to dynamically assigned addresses.
The keyword is replaced at runtime with the address assigned from the pool
in 'config address'.
ok patrick@
Diffstat (limited to 'sbin/iked')
-rw-r--r-- | sbin/iked/parse.y | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sbin/iked/parse.y b/sbin/iked/parse.y index 36b36bd036f..40e2ce2da6f 100644 --- a/sbin/iked/parse.y +++ b/sbin/iked/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.115 2020/10/29 21:49:58 tobhe Exp $ */ +/* $OpenBSD: parse.y,v 1.116 2020/11/01 09:50:24 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -454,7 +454,7 @@ typedef struct { %token IPCOMP OCSP IKELIFETIME MOBIKE NOMOBIKE RDOMAIN %token FRAGMENTATION NOFRAGMENTATION DPD_CHECK_INTERVAL %token ENFORCESINGLEIKESA NOENFORCESINGLEIKESA -%token TOLERATE MAXAGE +%token TOLERATE MAXAGE DYNAMIC %token CERTPARTIALCHAIN %token REQUEST %token <v.string> STRING @@ -816,6 +816,12 @@ host : host_spec { $$ = $1; } | ANY { $$ = host_any(); } + | DYNAMIC { + if (($$ = host("0.0.0.0")) == NULL) { + yyerror("could not parse host specification"); + YYERROR; + } + } ; ids : /* empty */ { @@ -1330,6 +1336,7 @@ lookup(char *s) { "default", DEFAULT }, { "dpd_check_interval", DPD_CHECK_INTERVAL }, { "dstid", DSTID }, + { "dynamic", DYNAMIC }, { "eap", EAP }, { "enc", ENCXF }, { "enforcesingleikesa", ENFORCESINGLEIKESA }, |