summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-eb-standalone.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-07-19 18:32:08 +0200
committerFlorian Westphal <fw@strlen.de>2018-07-19 23:12:37 +0200
commit25ef90814a991e80384d4369565c6decadfcd409 (patch)
treeb74a58fb55ca89941d93180e21d4ee5b2e9c692c /iptables/xtables-eb-standalone.c
parentde8574ac79c83d4575e2613472c1978a5154bdb7 (diff)
xtables: introduce nft_init_eb()
This wraps nft_init(), adding required things needed for ebtables. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/xtables-eb-standalone.c')
-rw-r--r--iptables/xtables-eb-standalone.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/iptables/xtables-eb-standalone.c b/iptables/xtables-eb-standalone.c
index 914d137b..2248b08d 100644
--- a/iptables/xtables-eb-standalone.c
+++ b/iptables/xtables-eb-standalone.c
@@ -41,28 +41,14 @@
#include "xtables-multi.h"
-extern struct xtables_globals ebtables_globals;
-
int xtables_eb_main(int argc, char *argv[])
{
int ret;
char *table = "filter";
- struct nft_handle h = {
- .family = NFPROTO_BRIDGE,
- };
+ struct nft_handle h;
- ebtables_globals.program_name = "ebtables";
- ret = xtables_init_all(&ebtables_globals, NFPROTO_BRIDGE);
- if (ret < 0) {
- fprintf(stderr, "%s/%s Failed to initialize ebtables-compat\n",
- ebtables_globals.program_name,
- ebtables_globals.program_version);
- exit(1);
- }
+ nft_init_eb(&h);
-#if defined(ALL_INCLUSIVE) || defined(NO_SHARED_LIBS)
- init_extensionsb();
-#endif
ret = do_commandeb(&h, argc, argv, &table);
if (ret)
ret = nft_commit(&h);