]> git.baikalelectronics.ru Git - kernel.git/commit
vxlan: fix wrong usage of VXLAN_VID_MASK
authorAlexey Kodanev <alexey.kodanev@oracle.com>
Fri, 13 Mar 2015 16:13:53 +0000 (19:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Mar 2015 17:08:07 +0000 (13:08 -0400)
commita575fd1edc764206d662394713f6a5f3e35ec98b
treea6aa7450acf5919c7ff1eabca584881e70819672
parent2181ec1a26c91dae51452f613cc3497189dca371
vxlan: fix wrong usage of VXLAN_VID_MASK

commit 2e6c775b8863da6a wrongly assumes that VXLAN_VDI_MASK includes
eight lower order reserved bits of VNI field that are using for remote
checksum offload.

Right now, when VNI number greater then 0xffff, vxlan_udp_encap_recv()
will always return with 'bad_flag' error, reducing the usable vni range
from 0..16777215 to 0..65535. Also, it doesn't really check whether RCO
bits processed or not.

Fix it by adding new VNI mask which has all 32 bits of VNI field:
24 bits for id and 8 bits for other usage.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c
include/net/vxlan.h