[Bug 278394] Reproducible kernel panic related to IPv4 routes populated by bird2 (BGP)

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 18 Apr 2024 02:06:45 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278394

--- Comment #18 from Gregory Neil Shapiro <gshapiro@FreeBSD.org> ---
Verified:

#23 ip_output (m=m@entry=0xfffff80007e3e000, opt=opt@entry=0x0, ro=<optimized
out>, flags=flags@entry=0, imo=0x0, inp=inp@entry=0x0) at
../../../netinet/ip_output.c:699
699                     switch (ip_output_pfil(&m, ifp, flags, inp, dst,
&fibnum,
(kgdb) print *dst
$6 = {sin_len = 16 '\020', sin_family = 2 '\002', sin_port = 0, sin_addr =
{s_addr = 4017795422}, sin_zero = "\000\000\000\000\000\000\000"}

s_addr is 94.177.122.239, which is the vxlanremote IP for vxlan0.

Checking BGP route map:

94.177.122.0/24      unicast [4IXP4RS1 18:24:23.600 from 185.1.125.1] * (100)
[AS58057i]
        via 185.1.125.5 on vxlan0

Once that route was exported to the kernel, routing to 94.177.122.239 went out
over vxlan0.

Configuration wise, I can avoid the crash with a static route for
94.177.122.239/32 out of the default gateway instead of the tunnel.  However,
would be good to fix the crash.

Might even be interesting for all of the tunnel interfaces (not just vxlan) to
check if they are about to send a packet for the tunnel endpoint inside the
tunnel and realize that won't work (e.g., if dst == vxlanremote).  Is that what
if_tunnel_check_nesting() does?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.