]> 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)
commit0da50aca539e47d2ad3d66966d360a08327cf057
tree78214d7efdef84f539b889826228579801aa3f38
parent9cf00c55660e3eff7780b299b1cdf74a80479b2f
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: 21b9967944b0 ("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