[openwrt/openwrt] dnsmasq: abort dhcp_check on interface state
LEDE Commits
lede-commits at lists.infradead.org
Thu Aug 20 17:46:18 EDT 2020
blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/aa403a440ad81b3430759d951cee1754ba5e4722
commit aa403a440ad81b3430759d951cee1754ba5e4722
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Tue Aug 18 15:09:22 2020 +0200
dnsmasq: abort dhcp_check on interface state
Abort the dhcp-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 cause a dnsmasq reload, thus dhcp won't become active
on this interface.
Signed-off-by: David Bauer <mail at david-bauer.net>
---
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 932103d8b5..2d72bc6a28 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
More information about the lede-commits
mailing list