]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
ebtables: Omit all-wildcard interface specs from output
authorPhil Sutter <phil@nwl.cc>
Fri, 26 Jul 2024 18:43:20 +0000 (20:43 +0200)
committerPhil Sutter <phil@nwl.cc>
Wed, 31 Jul 2024 21:13:55 +0000 (23:13 +0200)
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

index f4a3c69ac166040a1042c77eade9d7fe6fd69ad5..0f85e21861cdeb06e4e25eb7a2ff763fe9770e8e 100644 (file)
@@ -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);
 }