vxlan: correctly validate VXLAN ID against VXLAN_N_VID
am: 51a219a137
Change-Id: Ibe33b8e55a3c7625b7b985260b38b443ffbfadc9
This commit is contained in:
commit
4c8e89b3fd
1 changed files with 1 additions and 1 deletions
|
@ -2600,7 +2600,7 @@ static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[])
|
||||||
|
|
||||||
if (data[IFLA_VXLAN_ID]) {
|
if (data[IFLA_VXLAN_ID]) {
|
||||||
__u32 id = nla_get_u32(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;
|
return -ERANGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue