path: root/iptables/xtables-eb.c
diff options
authorPhil Sutter <>2018-07-19 18:32:09 +0200
committerFlorian Westphal <>2018-07-19 23:13:02 +0200
commit922508e9156327ccb8e35243781cf85f5787ee40 (patch)
treeba9f497f248cb16216ae69972b694f162d602424 /iptables/xtables-eb.c
parent25ef90814a991e80384d4369565c6decadfcd409 (diff)
xtables: implement ebtables-{save,restore}
The code for ebtables-restore was derived from legacy code, ebtables-save is actually a new implementation using the existing infrastructure and trying to adhere to legacy perl script output formatting as much as possible. This introduces a new format flag (FMT_EBT_SAVE) to allow nft_bridge_save_rule() to distinguish between ruleset listing (i.e., ebtables -L) and saving via ebtables-save - the two differ in how counters are being formatted. Odd, but that's how it is. Signed-off-by: Phil Sutter <> Signed-off-by: Florian Westphal <>
Diffstat (limited to 'iptables/xtables-eb.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c
index 44235347..ab0539c8 100644
--- a/iptables/xtables-eb.c
+++ b/iptables/xtables-eb.c
@@ -203,7 +203,7 @@ delete_entry(struct nft_handle *h,
return ret;
-static int get_current_chain(const char *chain)
+int ebt_get_current_chain(const char *chain)
if (!chain)
return -1;
@@ -846,7 +846,7 @@ int do_commandeb(struct nft_handle *h, int argc, char *argv[], char **table)
if (optarg && (optarg[0] == '-' || !strcmp(optarg, "!")))
xtables_error(PARAMETER_PROBLEM, "No chain name specified");
chain = optarg;
- selected_chain = get_current_chain(chain);
+ selected_chain = ebt_get_current_chain(chain);
flags |= OPT_COMMAND;
if (c == 'N') {