summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-03-02 14:45:49 +0100
committerPhil Sutter <phil@nwl.cc>2022-03-02 15:01:41 +0100
commite8f0fa21fd77ecc51faf39cefa3cccdb7d6a30cf (patch)
tree43ce10b68a3ad395aa84da1a020292945d61c66f
parent59d184be2d17be0bec5077eb7b0724cdc21ae7aa (diff)
scanner: Fix for ipportmap nat statements
Due to lookahead, "addr" keyword is still found in IP/IP6 scope, not STMT_NAT one. Fixes: a67fce7ffe7e4 ("scanner: nat: Move to own scope") Signed-off-by: Phil Sutter <phil@nwl.cc>
-rw-r--r--src/scanner.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scanner.l b/src/scanner.l
index fd1cf059..2154281e 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -678,7 +678,7 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr})
"rt0" { scanner_push_start_cond(yyscanner, SCANSTATE_EXPR_RT); return RT0; }
"rt2" { scanner_push_start_cond(yyscanner, SCANSTATE_EXPR_RT); return RT2; }
"srh" { scanner_push_start_cond(yyscanner, SCANSTATE_EXPR_RT); return RT4; }
-<SCANSTATE_EXPR_RT,SCANSTATE_STMT_NAT>"addr" { return ADDR; }
+<SCANSTATE_EXPR_RT,SCANSTATE_STMT_NAT,SCANSTATE_IP,SCANSTATE_IP6>"addr" { return ADDR; }
"hbh" { scanner_push_start_cond(yyscanner, SCANSTATE_EXPR_HBH); return HBH; }