Date: Wed, 7 May 2025 19:16:23 GMT From: Lexi Winter <ivy@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: a13702f04aff - stable/13 - bridge: define VLANTAGOF correctly Message-ID: <202505071916.547JGNel028153@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=a13702f04affcafb98840553599f7a5267adc791 commit a13702f04affcafb98840553599f7a5267adc791 Author: Lexi Winter <ivy@FreeBSD.org> AuthorDate: 2025-04-04 15:05:01 +0000 Commit: Lexi Winter <ivy@FreeBSD.org> CommitDate: 2025-05-07 19:09:59 +0000 bridge: define VLANTAGOF correctly to avoid strange precedence errors, enclose the macro body in parentheses. this fixes constructs like: if (VLANTAGOF(m) == i) Reviewed by: kp (cherry picked from commit f36292f010fcc6391605182f2973fdc12a3bd15f) --- sys/net/if_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index b392a9c69a7f..dd506d558c99 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -420,7 +420,7 @@ static void bridge_linkcheck(struct bridge_softc *sc); /* The default bridge vlan is 1 (IEEE 802.1Q-2003 Table 9-2) */ #define VLANTAGOF(_m) \ - (_m->m_flags & M_VLANTAG) ? EVL_VLANOFTAG(_m->m_pkthdr.ether_vtag) : 1 + ((_m->m_flags & M_VLANTAG) ? EVL_VLANOFTAG(_m->m_pkthdr.ether_vtag) : 1) static struct bstp_cb_ops bridge_ops = { .bcb_state = bridge_state_change,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505071916.547JGNel028153>