fedora-sysv / initscripts

📜 Scripts to bring up network interfaces and legacy utilities in Fedora.
GNU General Public License v2.0
45 stars 52 forks source link

ifup-routes: Use `ip route repace` to avoid race #401

Closed jamacku closed 2 years ago

jamacku commented 2 years ago

This should resolve the scenario when the link is brought up prior to disabling accept_ra.

This only happens when both IPv4 and IPv6 address is on the interface, because network-scripts does IPv4 first and brings up the interface.

Then it does IPv6 which disables the RA's, at that point the node has already learned the route from RA and setting a default route fails.

Using ip route replace we ensure if the above scenario happens we end-up with the correct default ipv6 route.

Huge thanks to @hjensas who debugged this issue and prepared a patch!

Related: #2034799