summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-save.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2020-02-21 13:29:05 +0100
committerPhil Sutter <phil@nwl.cc>2020-02-24 12:04:27 +0100
commit0f40a8bc49d3f7b815336199931a82f919f37c4e (patch)
treed844fce00e51f8ffec7f652406c6fb8a3a359860 /iptables/xtables-save.c
parent1639b8ba5105542c73e0e1c35e70f245dab89d81 (diff)
xtables: Drop -4 and -6 support from xtables-{save,restore}
Legacy tools don't support those options, either. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xtables-save.c')
-rw-r--r--iptables/xtables-save.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/iptables/xtables-save.c b/iptables/xtables-save.c
index 3a52f8c3..1b6c363b 100644
--- a/iptables/xtables-save.c
+++ b/iptables/xtables-save.c
@@ -32,7 +32,7 @@
#define prog_name xtables_globals.program_name
#define prog_vers xtables_globals.program_version
-static const char *ipt_save_optstring = "bcdt:M:f:46V";
+static const char *ipt_save_optstring = "bcdt:M:f:V";
static const struct option ipt_save_options[] = {
{.name = "counters", .has_arg = false, .val = 'c'},
{.name = "version", .has_arg = false, .val = 'V'},
@@ -40,8 +40,6 @@ static const struct option ipt_save_options[] = {
{.name = "table", .has_arg = true, .val = 't'},
{.name = "modprobe", .has_arg = true, .val = 'M'},
{.name = "file", .has_arg = true, .val = 'f'},
- {.name = "ipv4", .has_arg = false, .val = '4'},
- {.name = "ipv6", .has_arg = false, .val = '6'},
{NULL},
};
@@ -189,13 +187,6 @@ xtables_save_main(int family, int argc, char *argv[],
case 'd':
dump = true;
break;
- case '4':
- h.family = AF_INET;
- break;
- case '6':
- h.family = AF_INET6;
- xtables_set_nfproto(AF_INET6);
- break;
case 'V':
printf("%s v%s (nf_tables)\n", prog_name, prog_vers);
exit(0);