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 <mail@david-bauer.net>
This commit is contained in:
David Bauer 2020-08-18 15:09:22 +02:00 committed by CN_SZTL
parent 0763f9abe7
commit abb0ba46c0
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -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