summaryrefslogtreecommitdiff
path: root/package/network/services/dnsmasq/files/dnsmasq.init
diff options
context:
space:
mode:
authorMarcin Jurkowski <marcin1j@gmail.com>2017-09-14 14:49:10 +0200
committerHans Dedecker <dedeckeh@gmail.com>2017-09-18 10:14:34 +0200
commitfeab5fa51e829410ae6c572da282c14e9a7fd86f (patch)
tree1cb8deef0a095f47237ebdbc5c7514534c1086ed /package/network/services/dnsmasq/files/dnsmasq.init
parent400c5f03c30b39ef149a1edc0a4b5b2c0bb94317 (diff)
downloadmtk-20170518-feab5fa51e829410ae6c572da282c14e9a7fd86f.zip
mtk-20170518-feab5fa51e829410ae6c572da282c14e9a7fd86f.tar.gz
mtk-20170518-feab5fa51e829410ae6c572da282c14e9a7fd86f.tar.bz2
dnsmasq: fix dhcp "ignore" option on wwan interfaces
Init script won't append --no-dhcp-interface option if interface protocol is one of: ncm, directip, qmi, mbim. This is caused by IP address assigned to dynamically created netifd interfaces. As a result there's no netmask assigned to the main interface and dhcp_add() function returns prematurely. By moving network subnet check we can ensure that --no-dhcp-interface is properly generated for wwan interfaces. Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase; move network checks]
Diffstat (limited to 'package/network/services/dnsmasq/files/dnsmasq.init')
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init5
1 files changed, 3 insertions, 2 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 6c83b2e..0149643 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -457,9 +457,7 @@ dhcp_add() {
config_get networkid "$cfg" networkid
[ -n "$networkid" ] || networkid="$net"
- network_get_subnet subnet "$net" || return 0
network_get_device ifname "$net" || return 0
- network_get_protocol proto "$net" || return 0
[ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && {
DNS_SERVERS="$DNS_SERVERS $dnsserver"
@@ -471,6 +469,9 @@ dhcp_add() {
return 0
}
+ network_get_subnet subnet "$net" || return 0
+ network_get_protocol proto "$net" || return 0
+
# Do not support non-static interfaces for now
[ static = "$proto" ] || return 0