[openwrt/openwrt] dnsmasq: rework network interface ignore
LEDE Commits
lede-commits at lists.infradead.org
Thu Feb 22 00:17:43 PST 2024
jow pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/62acd9a2f9f18f30997d23b479abaea4940a4273
commit 62acd9a2f9f18f30997d23b479abaea4940a4273
Author: Yegor Yefremov <yegorslists at googlemail.com>
AuthorDate: Thu Feb 15 09:43:09 2024 +0100
dnsmasq: rework network interface ignore
In some situations (slow protocol or interfaces with auto 0), the
interfaces are not available during the dnsmasq initialization and
hence, the ignore setting will be skipped.
Install an interface trigger for ignored interfaces in case their
ifname cannot be resolved.
Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>
[bump PKG_RELEASE]
Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
package/network/services/dnsmasq/Makefile | 2 +-
package/network/services/dnsmasq/files/dnsmasq.init | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile
index 241f3463e2..e33d866304 100644
--- a/package/network/services/dnsmasq/Makefile
+++ b/package/network/services/dnsmasq/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmasq
PKG_UPSTREAM_VERSION:=2.89
PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
-PKG_RELEASE:=7
+PKG_RELEASE:=8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 510d328cd2..b43abdb8f7 100755
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -1244,10 +1244,11 @@ dnsmasq_stop()
add_interface_trigger()
{
- local interface ignore
+ local interface ifname ignore
config_get interface "$1" interface
config_get_bool ignore "$1" ignore 0
+ network_get_device ifname "$interface" || ignore=0
[ -n "$interface" ] && [ $ignore -eq 0 ] && procd_add_interface_trigger "interface.*" "$interface" /etc/init.d/dnsmasq reload
}
More information about the lede-commits
mailing list