diff options
author | Phil Sutter <phil@nwl.cc> | 2022-09-27 19:03:47 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2022-09-28 14:21:13 +0200 |
commit | 39cc849ed0f7ae0e5e09e3a2c278708fd36c8c14 (patch) | |
tree | 33de83b26dbbf5c8449c2fab962a4731faefebd5 /iptables | |
parent | e8fce1d700d068f7cebf009ee02b85623be2d4c4 (diff) |
ebtables: Eliminate OPT_TABLE
The flag is used for duplicate option checking only and there is a
boolean indicating the same already. So copy the error message from
EBT_CHECK_OPTION() in situ and just take care not to disturb restore
mode handling.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables')
-rw-r--r-- | iptables/xtables-eb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c index 3887ea1a..9aab3597 100644 --- a/iptables/xtables-eb.c +++ b/iptables/xtables-eb.c @@ -158,7 +158,6 @@ int ebt_get_current_chain(const char *chain) #define OPT_COMMANDS (flags & OPT_COMMAND || flags & OPT_ZERO) #define OPT_COMMAND 0x01 -#define OPT_TABLE 0x02 #define OPT_IN 0x04 #define OPT_OUT 0x08 #define OPT_JUMP 0x10 @@ -894,11 +893,13 @@ print_zero: } break; case 't': /* Table */ - ebt_check_option2(&flags, OPT_TABLE); if (restore && table_set) xtables_error(PARAMETER_PROBLEM, "The -t option cannot be used in %s.\n", xt_params->program_name); + else if (table_set) + xtables_error(PARAMETER_PROBLEM, + "Multiple use of same option not allowed"); if (!nft_table_builtin_find(h, optarg)) xtables_error(VERSION_PROBLEM, "table '%s' does not exist", |