Page MenuHomeVyOS Platform

A default route can be deleted by dhclient-script in some cases
Closed, ResolvedPublicBUG

Description

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:

  1. Each time when dhclient-script is run, it deletes the default gateway from the kernel, no matter what puts it there.
  2. 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.

Details

Difficulty level
Unknown (require assessment)
Version
1.3-rolling-202001231445
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

zsdc changed the task status from Open to In progress.Jan 24 2020, 6:57 PM
zsdc claimed this task.
zsdc created this task.
zsdc moved this task from Need Triage to In Progress on the VyOS 1.3 Equuleus board.
zsdc changed the task status from In progress to Needs testing.Mar 10 2020, 9:48 AM

This was resolved via dhclient hooks - there is a protection mechanism now, which allows deleting only routes with tag 210 that set by hooks to all DHCP routes.

erkin set Issue type to Bug (incorrect behavior).Aug 31 2021, 5:50 PM