diff mbox series

[iptables,14/14] ebtables: Omit all-wildcard interface specs from output

Message ID 20240727213648.28761-15-phil@nwl.cc
State Accepted
Delegated to: Phil Sutter
Headers show
Series Some fixes and trivial improvements | expand

Commit Message

Phil Sutter July 27, 2024, 9:36 p.m. UTC
Regular code path doesn't hit this because the conversion to
libnftnl_rule takes care of it already. Future changes though will cause
iptables_command_state objects to be printed directly, making this
relevant.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 iptables/nft-bridge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c
index f4a3c69ac1660..0f85e21861cde 100644
--- a/iptables/nft-bridge.c
+++ b/iptables/nft-bridge.c
@@ -212,7 +212,7 @@  static bool nft_rule_to_ebtables_command_state(struct nft_handle *h,
 
 static void print_iface(const char *option, const char *name, bool invert)
 {
-	if (*name)
+	if (*name && (strcmp(name, "+") || invert))
 		printf("%s%s %s ", invert ? "! " : "", option, name);
 }