]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libxt_mac: Fix for missing space in listing
authorPhil Sutter <phil@nwl.cc>
Mon, 30 Aug 2021 21:48:54 +0000 (23:48 +0200)
committerPhil Sutter <phil@nwl.cc>
Tue, 31 Aug 2021 00:17:59 +0000 (02:17 +0200)
Listing the extension using 'iptables -L', there was no space between
'MAC' and the following Address.

Reported-by: Adam Wójcik <a.wojcik@hyp.home.pl>
Fixes: 1bdb5535f561a ("libxtables: Extend MAC address printing/parsing support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
extensions/libxt_mac.c

index b90eef207c98ebf2f60bf9be5a28b2c402cd5df9..55891b2be71047b18cae45cebabd408280e1b8f0 100644 (file)
@@ -42,10 +42,10 @@ mac_print(const void *ip, const struct xt_entry_match *match, int numeric)
 {
        const struct xt_mac_info *info = (void *)match->data;
 
-       printf(" MAC");
+       printf(" MAC ");
 
        if (info->invert)
-               printf(" !");
+               printf("");
 
        xtables_print_mac(info->srcaddr);
 }