f-41: l3vni: borne à 65535 (RD <VTEP>:<l3vni> sur 16 bits) #41

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-12 13:05:14 +02:00
commit 3aa8119335
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
8 changed files with 25 additions and 23 deletions

View file

@ -5,8 +5,8 @@ import (
"testing"
)
func TestValid_AcceptsEvery24BitValueOutsideTheKernelTables(t *testing.T) {
for _, id := range []uint32{1, 252, 256, 4001, 16777215} {
func TestValid_AcceptsEvery16BitValueOutsideTheKernelTables(t *testing.T) {
for _, id := range []uint32{1, 252, 256, 4001, 65535} {
if err := Valid(id); err != nil {
t.Errorf("Valid(%d) = %v", id, err)
}
@ -15,8 +15,9 @@ func TestValid_AcceptsEvery24BitValueOutsideTheKernelTables(t *testing.T) {
func TestValid_RejectsOutOfRangeAndReservedTables(t *testing.T) {
cases := map[uint32]string{
0: "does not fit in 24 bits",
16777216: "does not fit in 24 bits",
0: "out of range 1-65535",
65536: "out of range 1-65535",
16777215: "out of range 1-65535",
253: "is reserved",
254: "is reserved",
255: "is reserved",