When static default route is configured manually via CLI and on some interface DHCP client is active, this route can be flushed by dhclient-script.
The problem appears in that case when the default gateway received by DHCP is the same as configured by hand, and this gateway is changing by the DHCP server at some moment.
Also, we already have feedback with default gateway losing in clouds (where DHCP is enabled no matter of config due to Cloud-init).
We need to change behavior in that way, which will guarantee that dhclient will change only routes, installed by DHCP.
Also, there are two other potentially risky things:
- Each time when dhclient-script is run, it deletes the default gateway from the kernel, no matter what puts it there.
- In case if FRR is not running, dhclient-scripts kills dhclient, which for example considering networking.service as a failure, and could be a problem, when dhclient is running at an early stage by a hook from Cloud-init.
So, there is a sense to review and improve dhclient-script to make it more clear and improve internal logic.