]> git.ipfire.org Git - thirdparty/grub.git/commit
net/ethernet: Fix VLAN networking on little-endian systems
authorChad Kimes <chkimes@github.com>
Wed, 2 Mar 2022 19:21:22 +0000 (14:21 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 7 Mar 2022 15:03:28 +0000 (16:03 +0100)
commitc216df4036b67e27defafd65543c075274709b37
tree98cd9e05ace953781f73cd331fd492f8be106eb8
parent8b7a0e262ae5d365a50449ddad6c84db438de0f1
net/ethernet: Fix VLAN networking on little-endian systems

VLAN configuration seems to have never worked on little-endian systems.
This is likely because VLANTAG_IDENTIFIER is not byte-swapped before
copying into the net buffer, nor is inf->vlantag. We can resolve this by
using grub_cpu_to_be16{_compile_time}() and its inverse when copying
VLAN info to/from the net buffer.

Signed-off-by: Chad Kimes <chkimes@github.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/net/ethernet.c