Page MenuHomeFreeBSD

bridge: Use %D identifier to format MAC address
ClosedPublic

Authored by zlei on Apr 13 2023, 3:13 AM.
Tags
None
Referenced Files
F144393862: D39542.id120303.diff
Sun, Feb 8, 5:21 AM
F144342314: D39542.id120238.diff
Sat, Feb 7, 11:02 PM
Unknown Object (File)
Sat, Jan 31, 9:45 AM
Unknown Object (File)
Jan 5 2026, 1:36 AM
Unknown Object (File)
Nov 28 2025, 8:56 PM
Unknown Object (File)
Nov 4 2025, 1:11 PM
Unknown Object (File)
Nov 4 2025, 1:11 PM
Unknown Object (File)
Nov 4 2025, 1:09 PM

Details

Summary

It is shorter and more readable.

No functional change intended.

Fixes: 2d3614fb132b bridge: Log MAC address port flapping
MFC after: 8 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.Apr 13 2023, 3:13 AM

I did not know about %D. It's good to learn things :)

This revision is now accepted and ready to land.Apr 13 2023, 6:58 AM
In D39542#900188, @kp wrote:

I did not know about %D. It's good to learn things :)

I found that while hacking the VLAN PCP bugs ;)

See sys/net/if_ethersubr.c:

/*
 * Perform common duties while attaching to interface list
 */
void
ether_ifattach(struct ifnet *ifp, const u_int8_t *lla)
{
...
        if (i != ifp->if_addrlen)
                if_printf(ifp, "Ethernet address: %6D\n", lla, ":");
...
}