]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
scanner: Extend asteriskstring definition
authorPhil Sutter <phil@nwl.cc>
Thu, 6 Feb 2020 11:31:56 +0000 (12:31 +0100)
committerPhil Sutter <phil@nwl.cc>
Mon, 10 Feb 2020 11:33:51 +0000 (12:33 +0100)
Accept escaped asterisks also mid-string and as only character.
Especially the latter will help when translating from iptables where
asterisk has no special meaning.

Signed-off-by: Phil Sutter <phil@nwl.cc>
src/scanner.l

index 99ee83559d2eb274def5179beb1bc1308f2c02a9..20a59de51d1ff73ef07b2cac8cf3f8f023841cce 100644 (file)
@@ -120,7 +120,7 @@ numberstring        ({decstring}|{hexstring})
 letter         [a-zA-Z]
 string         ({letter}|[_.])({letter}|{digit}|[/\-_\.])*
 quotedstring   \"[^"]*\"
-asteriskstring ({string}\*|{string}\\\*)
+asteriskstring ({string}\*|{string}\\\*|\\\*|{string}\\\*{string})
 comment                #.*$
 slash          \/