]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
nft-bridge: fix mac address printing
authorFlorian Westphal <fw@strlen.de>
Fri, 13 Apr 2018 12:43:28 +0000 (14:43 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 13 Apr 2018 18:05:51 +0000 (20:05 +0200)
Mask needs to be all-ones, else we print
<macaddr>/ff:ff:ff:ff:ff:ff

but such a mask is redundant, we can omit the mask.
ebtables does this correctly.

Signed-off-by: Florian Westphal <fw@strlen.de>
iptables/nft-bridge.c

index 22940cf79beba63db505eb759f7b52767a4362a1..04567a1fa2cab3db387615d3a789a1f31c683514 100644 (file)
@@ -57,7 +57,7 @@ static void ebt_print_mac(const unsigned char *mac)
 /* Put the mac address into 6 (ETH_ALEN) bytes returns 0 on success. */
 static void ebt_print_mac_and_mask(const unsigned char *mac, const unsigned char *mask)
 {
-       char hlpmsk[6] = {};
+       char hlpmsk[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 
        if (!memcmp(mac, eb_mac_type_unicast, 6) &&
            !memcmp(mask, eb_msk_type_unicast, 6))