Hello guys, After upgrading one of my hosts from FreeBSD 12.2 to FreeBSD 13.0, I started noticing a problem when exporting routes to the KRT.
My logs were getting flooded with "kernel: gw sdl_len too small". This message comes from cleanup_xaddrs_gateway() in sys/net/rtsock.c of releng/13.0, so I checked with "route monitor" and noticed that the blackhole routes and one interface route were the ones causing the message. got message of size 192 on Sat Aug 28 15:57:32 2021 RTM_ADD: Add Route: len 192, pid: 2293, seq 3, errno 22, flags:<UP,BLACKHOLE,PROTO1> locks: inits: sockaddrs: <DST,GATEWAY,NETMASK> 10.0.0.0 link#4 255.0.0.0 got message of size 192 on Sat Aug 28 15:57:32 2021 RTM_ADD: Add Route: len 192, pid: 2293, seq 4, errno 22, flags:<UP,PROTO1> locks: inits: sockaddrs: <DST,GATEWAY,NETMASK> 10.42.10.0 link#5 255.255.255.0 In BIRD they look the same as before the upgrade: bird> show route all 10.0.0.0/8 Table master4: 10.0.0.0/8 blackhole [s_null_4 2021-08-28 15:57:32] ! (200) Type: static univ bird> show route all 10.42.10.0/24 Table master4: 10.42.10.0/24 unicast [direct1 2021-08-28 16:07:59] ! (240) dev vlan10 Type: device univ I then decided to try manually adding a blackhole route using "route add -net 10.0.0.0/8 -blackhole -proto1 -nostatic", to get as close to what BIRD was trying to add and noticed that BIRD had a gateway, but "route add" didn't have one. got message of size 184 on Sat Aug 28 16:05:43 2021 RTM_ADD: Add Route: len 184, pid: 2766, seq 1, errno 0, flags:<UP,GATEWAY,DONE,BLACKHOLE,PROTO1> locks: inits: sockaddrs: <DST,NETMASK> 10.0.0.0 255.0.0.0 I tried commenting out line 324 in sysdep/bsd/krt-sock.c of v2.0.8 to see if that could fix it and bird was able to insert the blackhole route (can be seen below), but then bird started dying a couple seconds after starting up, with no error showing up on the logs. got message of size 184 on Sat Aug 28 15:27:33 2021 RTM_ADD: Add Route: len 184, pid: 46425, seq 2, errno 22, flags:<UP,PROTO1> locks: inits: sockaddrs: <DST,NETMASK> 10.42.10.0 255.255.255.0 got message of size 184 on Sat Aug 28 15:27:33 2021 RTM_ADD: Add Route: len 184, pid: 46425, seq 3, errno 0, flags:<UP,GATEWAY,DONE,BLACKHOLE,PROTO1> locks: inits: sockaddrs: <DST,NETMASK> 10.0.0.0 255.0.0.0 At this point, I ran out of ideas on what else to try. This is in a testing environment, so I can easily try things out or provide extra information. Thank you, Luiz
