From abb0ba46c021595d49c35609b70e473e6c79d127 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Tue, 18 Aug 2020 15:09:22 +0200 Subject: [PATCH] dnsmasq: abort dhcp_check on interface state Abort the link-check based on the interface instead of the carrier state. In cases where the interface is up but the carrier is down, netifd won't case a dnsmasq reload, thus dhcp won't be active on thsi interface. Signed-off-by: David Bauer --- package/network/services/dnsmasq/files/dnsmasq.init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 2436c848c3..bebcfa517c 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -106,9 +106,9 @@ dhcp_check() { [ -s "$stamp" ] && return $(cat "$stamp") - # If there's no carrier yet, skip this interface. + # If interface is down, skip it. # The init script will be called again once the link is up - case "$(devstatus "$ifname" | jsonfilter -e @.carrier)" in + case "$(devstatus "$ifname" | jsonfilter -e @.up)" in false) return 1;; esac