From a192f03520ebd0a2c0ecfca8abd1e00967f3b351 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 2 Aug 2018 17:05:19 +0200 Subject: ebtables: Fix for wrong program name in error messages Since nft_init_eb() is shared among standalone ebtables and ebtables-restore, allow for callers to pass the program name. Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- iptables/xtables-eb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'iptables/xtables-eb.c') diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c index ab0539c8..a88655ce 100644 --- a/iptables/xtables-eb.c +++ b/iptables/xtables-eb.c @@ -732,9 +732,9 @@ void ebt_add_watcher(struct xtables_target *watcher, cs->match_list->next = newnode; } -int nft_init_eb(struct nft_handle *h) +int nft_init_eb(struct nft_handle *h, const char *pname) { - ebtables_globals.program_name = "ebtables"; + ebtables_globals.program_name = pname; if (xtables_init_all(&ebtables_globals, NFPROTO_BRIDGE) < 0) { fprintf(stderr, "%s/%s Failed to initialize ebtables-compat\n", ebtables_globals.program_name, -- cgit v1.2.3