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
Unknown Object (File)
Dec 23 2023, 2:49 AM
Unknown Object (File)
Dec 12 2023, 11:19 AM
Unknown Object (File)
Sep 6 2023, 12:30 AM
Unknown Object (File)
Aug 23 2023, 8:35 PM
Unknown Object (File)
Jul 2 2023, 4:25 PM
Unknown Object (File)
May 15 2023, 6:17 PM
Unknown Object (File)
May 3 2023, 1:31 AM
Unknown Object (File)
Apr 14 2023, 10:10 AM

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, ":");
...
}