]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
ebtables-restore: Deny --init-table
authorPhil Sutter <phil@nwl.cc>
Wed, 2 Jun 2021 08:13:26 +0000 (10:13 +0200)
committerPhil Sutter <phil@nwl.cc>
Sat, 11 Jun 2022 09:47:03 +0000 (11:47 +0200)
Allowing this segfaults the program. The deny is in line with legacy
ebtables, so no point in implementing support for that.

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/xtables-eb.c

index 3d15063e80e91ed6b3234833639a06ba53a6e265..b986fd9e84799bbbf6a411a8d6fce71be0005612 100644 (file)
@@ -1077,6 +1077,9 @@ print_zero:
                        flags |= LIST_MAC2;
                        break;
                case 11: /* init-table */
+                       if (restore)
+                               xtables_error(PARAMETER_PROBLEM,
+                                             "--init-table is not supported in daemon mode");
                        nft_cmd_table_flush(h, *table, false);
                        return 1;
                case 13 :