From: Phil Sutter <phil@nwl.cc>
To: netfilter-devel@vger.kernel.org
Subject: [iptables PATCH 3/7] ebtables-translate: Drop exec_style
Date: Thu, 26 Jan 2023 13:24:02 +0100 [thread overview]
Message-ID: <20230126122406.23288-4-phil@nwl.cc> (raw)
In-Reply-To: <20230126122406.23288-1-phil@nwl.cc>
Apply the changes from commit 816bd1fdecb63 ("ebtables-nft: remove
exec_style") to ebtables-translate, too.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
iptables/xtables-eb-translate.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/iptables/xtables-eb-translate.c b/iptables/xtables-eb-translate.c
index 0c35272051752..4db10ae6706a1 100644
--- a/iptables/xtables-eb-translate.c
+++ b/iptables/xtables-eb-translate.c
@@ -24,9 +24,6 @@
/*
* From include/ebtables_u.h
*/
-#define EXEC_STYLE_PRG 0
-#define EXEC_STYLE_DAEMON 1
-
#define ebt_check_option2(flags, mask) EBT_CHECK_OPTION(flags, mask)
extern int ebt_invert;
@@ -172,7 +169,6 @@ static int nft_rule_eb_xlate_add(struct nft_handle *h, const struct xt_cmd_parse
return ret;
}
-/* We use exec_style instead of #ifdef's because ebtables.so is a shared object. */
static int do_commandeb_xlate(struct nft_handle *h, int argc, char *argv[], char **table)
{
char *buffer;
@@ -187,7 +183,6 @@ static int do_commandeb_xlate(struct nft_handle *h, int argc, char *argv[], char
};
char command = 'h';
const char *chain = NULL;
- int exec_style = EXEC_STYLE_PRG;
int selected_chain = -1;
struct xtables_rule_match *xtrm_i;
struct ebt_match *match;
@@ -292,9 +287,6 @@ static int do_commandeb_xlate(struct nft_handle *h, int argc, char *argv[], char
if (OPT_COMMANDS)
xtables_error(PARAMETER_PROBLEM,
"Multiple commands are not allowed");
- if (exec_style == EXEC_STYLE_DAEMON)
- xtables_error(PARAMETER_PROBLEM,
- "%s %s", prog_name, prog_vers);
printf("%s %s\n", prog_name, prog_vers);
exit(0);
case 'h':
--
2.38.0
next prev parent reply other threads:[~2023-01-26 12:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-26 12:23 [iptables PATCH 0/7] Small ebtables-translate review + extras Phil Sutter
2023-01-26 12:24 ` [iptables PATCH 1/7] Proper fix for "unknown argument" error message Phil Sutter
2023-01-26 12:24 ` [iptables PATCH 2/7] ebtables: Refuse unselected targets' options Phil Sutter
2023-01-26 12:24 ` Phil Sutter [this message]
2023-01-26 12:24 ` [iptables PATCH 4/7] ebtables-translate: Use OPT_* from xshared.h Phil Sutter
2023-01-26 12:24 ` [iptables PATCH 5/7] ebtables-translate: Ignore '-j CONTINUE' Phil Sutter
2023-01-26 12:24 ` [iptables PATCH 6/7] ebtables-translate: Print flush command after parsing is finished Phil Sutter
2023-01-26 12:24 ` [iptables PATCH 7/7] tests: xlate: Support testing multiple individual files Phil Sutter
2023-01-31 15:30 ` [iptables PATCH 0/7] Small ebtables-translate review + extras Phil Sutter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230126122406.23288-4-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).