]> git.ipfire.org Git - people/arne_f/kernel.git/commit
bnxt_en: Validate vlan protocol ID on RX packets
authorMichael Chan <michael.chan@broadcom.com>
Sun, 18 Jul 2021 19:36:30 +0000 (15:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jul 2021 12:35:39 +0000 (14:35 +0200)
commit134a0536f0a4922003054d5edfb30b4c21c2cf3d
tree0c5541bd7759599aae0fe3e9abc84e1b0476544f
parent4f7da0f97bebc506a429b289dffa2f3641ef1ab2
bnxt_en: Validate vlan protocol ID on RX packets

[ Upstream commit 96bdd4b9ea7ef9a12db8fdd0ce90e37dffbd3703 ]

Only pass supported VLAN protocol IDs for stripped VLAN tags to the
stack.  The stack will hit WARN() if the protocol ID is unsupported.

Existing firmware sets up the chip to strip 0x8100, 0x88a8, 0x9100.
Only the 1st two protocols are supported by the kernel.

Fixes: a196e96bb68f ("bnxt_en: clean up VLAN feature bit handling")
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c