Bug 227033

Summary: vxlan(4) does not work with vni larger than 65535
Product: Base System Reporter: susurrus.silent
Component: kernAssignee: freebsd-net (Nobody) <net>
Status: New ---    
Severity: Affects Some People CC: afedorov, emaste, gnn, qingli, sergey
Priority: ---    
Version: 11.1-RELEASE   
Hardware: amd64   
OS: Any   

Description susurrus.silent 2018-03-28 12:40:33 UTC
vxlan(4) does not work with vni >= 65536.

How to reproduce:

on host A:
ifconfig vxlan create inet 192.168.200.1/24 vxlanvni 65536 vxlanlocal 192.168.100.1 vxlanremote 192.168.100.2

on host B:
ifconfig vxlan create inet 192.168.200.2/24 vxlanvni 65536 vxlanlocal 192.168.100.2 vxlanremote 192.168.100.1

on host A:
ping -n 192.168.200.2

host B is unreachable as host B does not respond to arp request.
Comment 1 Sergey Akhmatov 2020-09-12 11:22:24 UTC
Can confirm: the bug is still there in 12-STABLE (r364973)

I can see transmitted packets encapsulated in vxlan with correct VNI > 65535. It seems that receiving host can't decapsulate such packets.
Comment 2 Aleksandr Fedorov freebsd_committer 2020-09-15 11:43:43 UTC
This should be fixed in 13.0-CURRENT r364257, see:
https://reviews.freebsd.org/D26071

With this patch I can set VNI to 70000 and 2000000.

So, I think it should be MFC'd to 12-STABLE.