]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Jul 2021 15:25:44 +0000 (08:25 -0700)
commit96bdd4b9ea7ef9a12db8fdd0ce90e37dffbd3703
tree78214d7efdef84f539b889826228579801aa3f38
parent3958b1da725a477b4a222183d16a14d85445d4b6
bnxt_en: Validate vlan protocol ID on RX packets

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>
drivers/net/ethernet/broadcom/bnxt/bnxt.c