git: a13702f04aff - stable/13 - bridge: define VLANTAGOF correctly
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 07 May 2025 19:16:23 UTC
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,