From 3f123dcf556487e753b43d7e43ff7016013349dc Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 6 Aug 2018 17:21:55 +0200 Subject: ebtables-restore: Use xtables_restore_parse() This drops the dedicated input parser (which was broken in many ways anyway) and replaces it by the common one now that all required knobs are in place. Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- iptables/xtables-eb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'iptables/xtables-eb.c') diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c index 763d1ad9..c5c98c33 100644 --- a/iptables/xtables-eb.c +++ b/iptables/xtables-eb.c @@ -764,7 +764,8 @@ int nft_init_eb(struct nft_handle *h, const char *pname) return 0; } -int do_commandeb(struct nft_handle *h, int argc, char *argv[], char **table) +int do_commandeb(struct nft_handle *h, int argc, char *argv[], char **table, + bool restore) { char *buffer; int c, i; @@ -811,6 +812,7 @@ int do_commandeb(struct nft_handle *h, int argc, char *argv[], char **table) } /* prevent getopt to spoil our error reporting */ + optind = 0; opterr = false; cs.eb.bitmask = EBT_NOPROTO; -- cgit v1.2.3