FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.33k stars 1.25k forks source link

Kernel and Static routes missing from 'show ip route' in FRR 9.* up to FRR 10.1.1 on FreeBSD #17113

Open alexissavin opened 3 days ago

alexissavin commented 3 days ago

Description

Kernel's default gateway and static routes are missing from 'show ip route' in FRR 9.* up to FRR 10.1.1 on FreeBSD 14. This lead to unexpected behavior such as preventing the establishment of BGP over multi-hop sessions.

To make it short:

Version

Reproduced on FRR 9.1.1, FRR 9.1.2, FRR 10.1.1 running on 14.1-RELEASE-p5 and FreeBSD 14.1-STABLE

How to reproduce

Deploy FreeBSD 14 then perform the following actions:

frr8-8.5.6_1 (Before the problem appears)

pkg update pkg search frr pkg install frr8-8.5.6_1 vi /etc/rc.conf

zebra_flags="-P0"
ospfd_flags="-P0"
frr_daemons="zebra bgpd"
frr_enable="Yes"

mkdir /usr/local/etc/frr/ cat /usr/local/etc/frr/vtysh.conf

username root nopassword

touch /usr/local/etc/frr/zebra.conf /usr/local/etc/frr/bgpd.conf service frr onestart vtysh -c "show ip route"

K>* 0.0.0.0/0 [0/0] via 172.16.0.1, ena0, 00:09:56
C>* 172.16.0.0/24 [0/1] is directly connected, ena0, 00:09:56

frr10-10.1.1_1 (Latest affected version of FRR)

service frr onestop pkg remove frr8-8.5.6_1 pkg install frr10-10.1.1_1 service frr onestart vtysh -c "show ip route"

C>* 172.16.0.0/24 [0/1] is directly connected, ena0, 00:00:19
L>* 172.16.0.16/32 is directly connected, ena0, 00:00:19

route add 10.42.42.0/24 172.16.0.1 vtysh -c "show ip route"

K>* 10.42.42.0/24 [0/0] via 172.16.0.1, ena0, 00:00:28
C>* 172.16.0.0/24 [0/1] is directly connected, ena0, 00:04:17
L>* 172.16.0.16/32 is directly connected, ena0, 00:04:17

Expected behavior

Default gateway and static kernel routes present in the kernel routing's table should be imported by zebra and appear in the result of 'show ip route'.

Actual behavior

Default gateway and static kernel routes present in the kernel routing's table before FRR is started are ignored and do not appear in the result of 'show ip route'.

Additional context

9185 also impact FreeBSD (version 12), but state that this only affect route without gateway (ie: only pointing to an interface)

Checklist

alexissavin commented 3 days ago

16597 seems to address this issue. I hope this could be merged in FRR9.1 and FRR10.1

ocochard commented 3 days ago

Would you like this patch patch into the existing net/frr9 and net/frr10 ports without waiting for new FRR release ?

alexissavin commented 3 days ago

Well, we are running net/frr9 in production, more precisely 9.1.2. We switched to FRR 9 recently and considering the rapid changes introduced between versions, we do not wish to upgrade too fast to upper versions.

We applied the patch building the port, but hope that considering the impact, this could make its way into the official release.