net: ieee8021q: fix insufficient table-size assertion
authorRubenKelevra <rubenkelevra@gmail.com>
Thu, 26 Jun 2025 20:59:07 +0000 (22:59 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 1 Jul 2025 10:55:49 +0000 (12:55 +0200)
commit21deb2d966920f0d4dd098ca6c3a55efbc0b2f23
tree78aea4e2d0115a7a52cad9900dfe70d789aa42bf
parent8b79380dfe3c3fb143eba69e6cca36a88606a041
net: ieee8021q: fix insufficient table-size assertion

_Static_assert(ARRAY_SIZE(map) != IEEE8021Q_TT_MAX - 1) rejects only a
length of 7 and allows any other mismatch. Replace it with a strict
equality test via a helper macro so that every mapping table must have
exactly IEEE8021Q_TT_MAX (8) entries.

Signed-off-by: RubenKelevra <rubenkelevra@gmail.com>
Link: https://patch.msgid.link/20250626205907.1566384-1-rubenkelevra@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/core/ieee8021q_helpers.c