]> git.ipfire.org Git - thirdparty/iptables.git/commit
xtables-arp: Integrate OPT_* defines into xshared.h
authorPhil Sutter <phil@nwl.cc>
Fri, 25 Oct 2019 15:21:13 +0000 (17:21 +0200)
committerPhil Sutter <phil@nwl.cc>
Wed, 30 Oct 2019 09:01:09 +0000 (10:01 +0100)
commitd960a991350ca429e029a76fbccfff8f9ac37be3
tree960493f5a24488afbeb1344c4486a7bd394e0144
parent56fe510492bc2b95d84f7ab81a994b459076b7d1
xtables-arp: Integrate OPT_* defines into xshared.h

These defines are internal use only, so their actual value doesn't
matter as long as they're unique and inverse_for_options array items
match:

When negating a given option, the corresponding OPT_* value's bit is
used as an index into inverse_for_options to retrieve the corresponding
invflag. If zero, either negating or the option itself is not supported.
(In practice, a lookup for unsupported option won't happen as those are
caught by getopt_long()).

Since xtables-arp's OPT_* values change, adjust the local
inverse_for_options array accordingly.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/xshared.h
iptables/xtables-arp.c