* [PATCH net] geneve: maximum value of VNI cannot be used
@ 2017-08-09 0:26 Girish Moodalbail
2017-08-10 5:41 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Girish Moodalbail @ 2017-08-09 0:26 UTC (permalink / raw)
To: pshelar, davem, netdev
Geneve's Virtual Network Identifier (VNI) is 24 bit long, so the range
of values for it would be from 0 to 16777215 (2^24 -1). However, one
cannot create a geneve device with VNI set to 16777215. This patch fixes
this issue.
Signed-off-by: Girish Moodalbail <girish.moodalbail@oracle.com>
---
drivers/net/geneve.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 745d57ae..8b8565d 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -1099,7 +1099,7 @@ static int geneve_validate(struct nlattr *tb[], struct nlattr *data[],
if (data[IFLA_GENEVE_ID]) {
__u32 vni = nla_get_u32(data[IFLA_GENEVE_ID]);
- if (vni >= GENEVE_VID_MASK)
+ if (vni >= GENEVE_N_VID)
return -ERANGE;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] geneve: maximum value of VNI cannot be used
2017-08-09 0:26 [PATCH net] geneve: maximum value of VNI cannot be used Girish Moodalbail
@ 2017-08-10 5:41 ` David Miller
2017-08-10 15:58 ` Girish Moodalbail
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2017-08-10 5:41 UTC (permalink / raw)
To: girish.moodalbail; +Cc: pshelar, netdev
From: Girish Moodalbail <girish.moodalbail@oracle.com>
Date: Tue, 8 Aug 2017 17:26:24 -0700
> Geneve's Virtual Network Identifier (VNI) is 24 bit long, so the range
> of values for it would be from 0 to 16777215 (2^24 -1). However, one
> cannot create a geneve device with VNI set to 16777215. This patch fixes
> this issue.
>
> Signed-off-by: Girish Moodalbail <girish.moodalbail@oracle.com>
I always worry that someone, somewhere, might be using this in some
way and this will break things.
But I'll apply this for now.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] geneve: maximum value of VNI cannot be used
2017-08-10 5:41 ` David Miller
@ 2017-08-10 15:58 ` Girish Moodalbail
0 siblings, 0 replies; 3+ messages in thread
From: Girish Moodalbail @ 2017-08-10 15:58 UTC (permalink / raw)
To: David Miller; +Cc: pshelar, netdev
On 8/9/17 10:41 PM, David Miller wrote:
> From: Girish Moodalbail <girish.moodalbail@oracle.com>
> Date: Tue, 8 Aug 2017 17:26:24 -0700
>
>> Geneve's Virtual Network Identifier (VNI) is 24 bit long, so the range
>> of values for it would be from 0 to 16777215 (2^24 -1). However, one
>> cannot create a geneve device with VNI set to 16777215. This patch fixes
>> this issue.
>>
>> Signed-off-by: Girish Moodalbail <girish.moodalbail@oracle.com>
>
> I always worry that someone, somewhere, might be using this in some
> way and this will break things.
>
> But I'll apply this for now.
>
Thanks David. As per the output of 'ip link help geneve', 16777215 is a valid
value. However, due to incorrect check in the kernel that value was not supported.
$ ip link help geneve |egrep -A1 VNI
Usage: ... geneve id VNI
remote ADDR
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-10 15:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-09 0:26 [PATCH net] geneve: maximum value of VNI cannot be used Girish Moodalbail
2017-08-10 5:41 ` David Miller
2017-08-10 15:58 ` Girish Moodalbail
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.