]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: bpf: Use correct mask for VLAN_TAG case
authorMarkos Chandras <markos.chandras@imgtec.com>
Mon, 23 Jun 2014 09:38:52 +0000 (10:38 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 26 Jun 2014 09:48:21 +0000 (10:48 +0100)
commite4921fc41c5eee7d7012d3e2bf51c2d5aa031363
tree1e144d5ff5a30b65ac01ee146bbcd444e1137741
parent2357942e68495575be1e251d3681d0b5aa06e091
MIPS: bpf: Use correct mask for VLAN_TAG case

Using VLAN_VID_MASK is not correct to get the vlan tag. Use
~VLAN_PRESENT_MASK instead and make sure it's u16 so the top 16-bits
will be removed. This will ensure that the emit_andi() code will not
treat this as a big 32-bit unsigned value.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7127/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/net/bpf_jit.c