Created attachment 211511 [details] Patch for vxlan tunnelfib support I have a FreeBSD router that heavily relies on two different FIBs to do its job. I needed my vxlan interface to use a different FIB for the outgoing packets encapsulated by the interface, but I discovered that it wasn't implemented yet. I implemented this featured based on what was done for the gre(4) and gif(4) interfaces.
Created attachment 211517 [details] Patch for vxlan tunnelfib support
Any progress on this issue? Can I help with anything else here?
Hi Luiz Amaral, Some logic are missing in your patch 'Patch for vxlan tunnelfib support'. See https://cgit.freebsd.org/src/tree/sys/net/if_vxlan.c#n2536 and https://cgit.freebsd.org/src/tree/sys/net/if_vxlan.c#n2648 . It looks good if 'fib[4,6]_lookup()' is fixed as well. @CC Bryan Venteicher
Created attachment 228139 [details] VXLAN Tunnelfib patch with fib_lookup logic Hi Zhenlei, The old patch was done against 12.1 and it looks like some things got reworked in 13.0. I redid the patch against CURRENT and included the changes on the fib[4,6]_lookup functions. I did some testing on my machines and it works as expected when tunnelfib is set to a non-default FIB. Let me know what you think. Luiz
Created attachment 228140 [details] VXLAN Tunnelfib patch with fib_lookup logic I forgot to include the manpage on the previous patch. This one has it.
(In reply to Luiz Amaral from comment #5) The patch looks good to me now. PS: Since STABLE/13 the routing part has changed significantly, see the release note: https://www.freebsd.org/releases/13.0R/relnotes/#network-routing
(In reply to Zhenlei Huang from comment #6) Thank you! Do I need to do anything else now or do we just wait for Bryan's review?
(In reply to Luiz Amaral from comment #7) It seems Bryan is out of bandwidth. Created code review request with slight modification. See https://reviews.freebsd.org/D32820
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=7f7a804ae077a0c43d8c3f1444f90bdfb841c6b1 commit 7f7a804ae077a0c43d8c3f1444f90bdfb841c6b1 Author: Zhenlei Huang <zlei.huang@gmail.com> AuthorDate: 2022-07-08 18:12:14 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2022-07-08 18:14:19 +0000 vxlan: Add support for socket ioctls SIOC[SG]TUNFIB Submitted by: Luiz Amaral <email@luiz.eng.br> PR: 244004 Differential Revision: https://reviews.freebsd.org/D32820 MFC after: 2 weeks sbin/ifconfig/ifconfig.8 | 5 +++-- sys/net/if_vxlan.c | 27 +++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=8819353dd0dfddb9bcd156a2773efc3770d09eff commit 8819353dd0dfddb9bcd156a2773efc3770d09eff Author: Zhenlei Huang <zlei.huang@gmail.com> AuthorDate: 2022-07-08 18:12:14 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2023-01-11 10:35:59 +0000 vxlan: Add support for socket ioctls SIOC[SG]TUNFIB Submitted by: Luiz Amaral <email@luiz.eng.br> PR: 244004 Reviewed by: gbe (manpages), melifaro, pauamma (manpages) Approved by: kp (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D32820 (cherry picked from commit 7f7a804ae077a0c43d8c3f1444f90bdfb841c6b1) sbin/ifconfig/ifconfig.8 | 5 +++-- sys/net/if_vxlan.c | 27 +++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-)
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=40beb4ae59ce85c3139539d87ad52a777ee2cbf4 commit 40beb4ae59ce85c3139539d87ad52a777ee2cbf4 Author: Zhenlei Huang <zlei.huang@gmail.com> AuthorDate: 2022-07-08 18:12:14 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2023-01-13 04:30:20 +0000 vxlan: Add support for socket ioctls SIOC[SG]TUNFIB Submitted by: Luiz Amaral <email@luiz.eng.br> PR: 244004 Reviewed by: gbe (manpages), melifaro, pauamma (manpages) Approved by: kp (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D32820 (cherry picked from commit 7f7a804ae077a0c43d8c3f1444f90bdfb841c6b1) (cherry picked from commit 8819353dd0dfddb9bcd156a2773efc3770d09eff) sbin/ifconfig/ifconfig.8 | 5 +++-- sys/net/if_vxlan.c | 26 +++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-)