Skip to content

YT-377: Fix static route priority conflict when using dhcpcd

Andrii Sosiuk requested to merge reduce-more-route-prio-for-statick-ips into main

The if-up workflow creates a route entry for the static IP even when no Ethernet cable is connected to the board. This static route can overlap with the default route provided by the DHCP client, potentially leading to incorrect routing behavior.

This issue was previously addressed in a past commit for the udhcpc client by assigning a metric of 50 to static IP interfaces. However, dhcpcd assigns a higher default metric (1004) to Ethernet interfaces, which reintroduces the original problem.

This commit increases the metric value for static routes when dhcpcd is present, reestablishing correct routing priority and preventing route conflicts.

Edited by Andrii Sosiuk

Merge request reports

Loading