]> git.ipfire.org Git - thirdparty/iptables.git/commit
xtables-compat: fix wildcard detection
authorFlorian Westphal <fw@strlen.de>
Tue, 8 May 2018 10:45:25 +0000 (12:45 +0200)
committerFlorian Westphal <fw@strlen.de>
Thu, 10 May 2018 00:31:05 +0000 (02:31 +0200)
commit652b98e79371102f8e5edf572a7a5c2aa282c51a
tree365f9bc3f4a3e0e1a691fe99d7977fb4bf8f4489
parent49f4993313b7a775588ee3dce448c8dbc2624f95
xtables-compat: fix wildcard detection

if (outiface[len] == '\0')

is always true. 'eth+' is stored as 'eth' with length 3, so
   "eth"[3] == 0.

'eth' is stored as 'eth\0' with length 4, so "eth\0"[4] is also true.
Add a helper for this, then use it.

Signed-off-by: Florian Westphal <fw@strlen.de>
iptables/nft-shared.c