Message ID | 20200210111423.18122-2-phil@nwl.cc |
---|---|
State | Accepted |
Delegated to: | Pablo Neira |
Headers | show |
Series | [nft,v2,1/2] doc: nft.8: Mention wildcard interface matching | expand |
On Mon, Feb 10, 2020 at 12:14:23PM +0100, Phil Sutter wrote: > 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. Fine with me, thanks.
diff --git a/src/scanner.l b/src/scanner.l index 99ee83559d2eb..20a59de51d1ff 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -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 \/
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> --- Changes since v1: - Still reject unescaped asterisks mid-string. --- src/scanner.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)