diff options
author | Phil Sutter <phil@nwl.cc> | 2023-05-05 20:04:41 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2023-08-11 15:56:38 +0200 |
commit | 11c464ed015b52a28d90c63c69e10e5f7d4053d4 (patch) | |
tree | 5c2d3bd5a627720284e609dd966ff94246847ac8 /iptables/xtables-eb.c | |
parent | ca709b5784c982de12d6eab361cfc9c900aec4c7 (diff) |
Add --compat option to *tables-nft and *-nft-restore commands
The flag sets nft_handle::compat boolean, indicating a compatible rule
implementation is wanted. Users expecting their created rules to be
fetched from kernel by an older version of *tables-nft may use this to
avoid potential compatibility issues.
Changes since v1:
- Expect short option '-C' in {ip,ip6,eb}tables-nft-restore command line
parser
- Support -C/--compat in arptables-nft-restore, too
- Update man pages with the new flag
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xtables-eb.c')
-rw-r--r-- | iptables/xtables-eb.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c index 08eec79d..ffd51efa 100644 --- a/iptables/xtables-eb.c +++ b/iptables/xtables-eb.c @@ -223,6 +223,7 @@ struct option ebt_original_options[] = { "init-table" , no_argument , 0, 11 }, { "concurrent" , no_argument , 0, 13 }, { "check" , required_argument, 0, 14 }, + { "compat" , no_argument , 0, 15 }, { 0 } }; @@ -335,7 +336,8 @@ static void print_help(const struct xtables_target *t, "--modprobe -M program : try to insert modules using this program\n" "--concurrent : use a file lock to support concurrent scripts\n" "--verbose -v : verbose mode\n" -"--version -V : print package version\n\n" +"--version -V : print package version\n" +"--compat : create rules compatible for parsing with old binaries\n\n" "Environment variable:\n" /*ATOMIC_ENV_VARIABLE " : if set <FILE> (see above) will equal its value"*/ "\n\n"); @@ -1097,6 +1099,9 @@ print_zero: return 1; case 13 : break; + case 15: + h->compat = true; + break; case 1 : if (!strcmp(optarg, "!")) ebt_check_inverse2(optarg, argc, argv); |