git: 9af6f4268ac3 - main - bridge: Use the %D identifier to format MAC address
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Apr 2023 10:09:58 UTC
The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9af6f4268ac3cc8203f34c746d955b4405279099 commit 9af6f4268ac3cc8203f34c746d955b4405279099 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2023-04-14 10:08:56 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2023-04-14 10:08:56 +0000 bridge: Use the %D identifier to format MAC address It is shorter and more readable. No functional change intended. Reviewed by: kp Fixes: 2d3614fb132b bridge: Log MAC address port flapping MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39542 --- sys/net/if_bridge.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index f71d7c0cdfd1..44ee52e62b77 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -2957,11 +2957,10 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t *dst, uint16_t vlan, if (V_log_mac_flap && ppsratecheck(&V_log_last, &V_log_count, V_log_interval)) { - uint8_t *addr = &brt->brt_addr[0]; log(LOG_NOTICE, - "%s: mac address %02x:%02x:%02x:%02x:%02x:%02x vlan %d moved from %s to %s\n", + "%s: mac address %6D vlan %d moved from %s to %s\n", sc->sc_ifp->if_xname, - addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], + &brt->brt_addr[0], ":", brt->brt_vlan, obif->bif_ifp->if_xname, bif->bif_ifp->if_xname);