summaryrefslogtreecommitdiffstats
path: root/iptables
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-11-25 04:27:21 +0100
committerPhil Sutter <phil@nwl.cc>2022-11-29 13:25:26 +0100
commit7533e96dadfcecbb49f819976ffc986a67920545 (patch)
treed958a2655969aaf9f52a08c58ac2ac6207ea44f3 /iptables
parent023dd2c515be63ddb2f0b6a6f3bccab4cdf7a71c (diff)
extensions: Leverage xlate auto-spacing
Drop code which is used explicitly to deal with spacing. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables')
-rw-r--r--iptables/nft-bridge.c3
-rw-r--r--iptables/xtables-translate.c5
2 files changed, 0 insertions, 8 deletions
diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c
index 4367d072..31800913 100644
--- a/iptables/nft-bridge.c
+++ b/iptables/nft-bridge.c
@@ -830,7 +830,6 @@ static int xlate_ebaction(const struct iptables_command_state *cs, struct xt_xla
else if (strcmp(cs->jumpto, XTC_LABEL_RETURN) == 0)
xt_xlate_add(xl, " return");
else if (cs->target->xlate) {
- xt_xlate_add(xl, " ");
struct xt_xlate_tg_params params = {
.ip = (const void *)&cs->eb,
.target = cs->target->t,
@@ -876,8 +875,6 @@ static void nft_bridge_xlate_mac(struct xt_xlate *xl, const char *type, bool inv
for (i=1; i < ETH_ALEN; i++)
xt_xlate_add(xl, ":%02x", mac[i] & mask[i]);
}
-
- xt_xlate_add(xl, " ");
}
static int nft_bridge_xlate(const struct iptables_command_state *cs,
diff --git a/iptables/xtables-translate.c b/iptables/xtables-translate.c
index d1e87f16..4e8db4be 100644
--- a/iptables/xtables-translate.c
+++ b/iptables/xtables-translate.c
@@ -83,7 +83,6 @@ int xlate_action(const struct iptables_command_state *cs, bool goto_set,
else if (strcmp(cs->jumpto, XTC_LABEL_RETURN) == 0)
xt_xlate_add(xl, " return");
else if (cs->target->xlate) {
- xt_xlate_add(xl, " ");
struct xt_xlate_tg_params params = {
.ip = (const void *)&cs->fw,
.target = cs->target->t,
@@ -122,10 +121,6 @@ int xlate_matches(const struct iptables_command_state *cs, struct xt_xlate *xl)
return 0;
ret = matchp->match->xlate(xl, &params);
-
- if (strcmp(matchp->match->name, "comment") != 0)
- xt_xlate_add(xl, " ");
-
if (!ret)
break;
}