vxlan: correctly validate VXLAN ID against VXLAN_N_VID

am: 51a219a137

Change-Id: Ibe33b8e55a3c7625b7b985260b38b443ffbfadc9
This commit is contained in:
Matthias Schiffer 2017-03-22 11:28:41 +00:00 committed by android-build-merger
commit 4c8e89b3fd

View file

@ -2600,7 +2600,7 @@ static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[])
if (data[IFLA_VXLAN_ID]) {
__u32 id = nla_get_u32(data[IFLA_VXLAN_ID]);
if (id >= VXLAN_VID_MASK)
if (id >= VXLAN_N_VID)
return -ERANGE;
}