summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-eb.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-05-08 16:31:29 +0200
committerFlorian Westphal <fw@strlen.de>2018-05-10 02:31:05 +0200
commit07f4ca96816886635acfb9478b2d04929938eb78 (patch)
tree4e75aef91de288c9e814580703a77cc71bd73e28 /iptables/xtables-eb.c
parent0ca2d2a2a5994a6131ad32aedbc42b530ac529bd (diff)
xtables-compat: ebtables: allow checking for zero-mac
Allow checking for an all-zero mac address by replacing checks on the address with a check on the option flag. Its set when '-d' or '-s' appears on the command line and when seeing a linklayer payload request for ether s/daddr. Same for -p: s this flag gets removed during getopt when 'p' is encountered. So, if its set, no need to check protocol type. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/xtables-eb.c')
-rw-r--r--iptables/xtables-eb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c
index 5f8f0fb5..ba26aca1 100644
--- a/iptables/xtables-eb.c
+++ b/iptables/xtables-eb.c
@@ -790,6 +790,7 @@ int do_commandeb(struct nft_handle *h, int argc, char *argv[], char **table)
/* prevent getopt to spoil our error reporting */
opterr = false;
+ cs.eb.bitmask = EBT_NOPROTO;
/* Getopt saves the day */
while ((c = getopt_long(argc, argv,