diff options
author | Phil Sutter <phil@nwl.cc> | 2020-10-30 12:42:57 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2020-12-03 00:27:57 +0100 |
commit | 8bd4b4f79b5de483353a8c0d0962e71934b7bdd2 (patch) | |
tree | ba5d05c78d0ee9a45a0711fb386decf63342c119 /extensions/iptables.t | |
parent | 44457c0805905ea22b4ecf9156648e774dd29155 (diff) |
xshared: Merge some command option-related code
Add OPT_FRAGMENT define into the enum of other OPT_* defines at the
right position and adjust the arptables-specific ones that follow
accordingly. Appropriately adjust inverse_for_options array in
xtables-arp.c.
Extend optflags from iptables.c by the arptables values for the sake of
completeness, then move it to xshared.h along with NUMBER_OF_OPT
definition. As a side-effect, this fixes for wrong ordering of entries
in arptables' 'optflags' copy.
Add arptables-specific bits to commands_v_options table (the speicific
options are matches on ARP header fields, just treat them like '-s'
option. This is also just a cosmetic change, arptables doesn't have a
generic_opt_check() implementation and hence doesn't use such a table.
With things potentially ready for common use, move commands_v_options
table along with generic_opt_check() and opt2char() into xshared.c and
drop the local (identical) implementations from iptables.c, ip6tables.c
xtables.c and xtables-arp.c. While doing so, fix ordering of entries in
that table: the row for CMD_ZERO_NUM was in the wrong position. Since
all moved rows though are identical, this had no effect in practice.
Fixes: d960a991350ca ("xtables-arp: Integrate OPT_* defines into xshared.h")
Fixes: 384958620abab ("use nf_tables and nf_tables compatibility interface")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions/iptables.t')
0 files changed, 0 insertions, 0 deletions