mirror of
https://gitlab.com/prpl-foundation/prplmesh/prplMesh.git
synced 2025-12-20 01:21:22 +08:00
Fix a bug where the VLAN ID observed on the wire did not match the configured Primary VLAN ID. The root cause was applying htons() to a 12-bit bit-field, combined with compiler- and architecture-dependent bit-field layout. Changes: - Replace the TCI bit-field with a plain 16-bit field. - Add build_tci() to assemble PCP/DEI/VID with bitwise ops. - Apply htons() once to the full 16-bit TCI after composition. This removes endianness ambiguity and bit-field layout dependency, ensuring the VLAN ID is encoded consistently across toolchains and platforms when tagging IEEE 1905 multicast packets. https://prplfoundationcloud.atlassian.net/browse/PPM-3509 Signed-off-by: Richard Yu <richard.yu@mitrastar.com.tw>