Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#876 - dnsmasq-full "Exclude interfaces" configuration does not work as expected. #5859

Closed
openwrt-bot opened this issue Jun 29, 2017 · 3 comments
Labels

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Jun 29, 2017

7hunderbug:

Device problem occurs on: BT Home Hub 5A / Lantiq xrx200

Software versions of LEDE release, packages, etc: LEDE Reboot 17.01.2 r3435-65eec8bd5f / LuCI lede-17.01 branch (git-17.163.57307-c79bb96)

Steps to reproduce:

By default, dnsmasq-full listens on all interfaces, including pppoe-wan, tun0, lo, other vpns etc. I want to restrict dnsmasq to listen only on br-lan and lo (I'm also running dns-crypt, wireguard and openvpn) and I want to exclude pppoe-wan, vpn_wg and tun0.

  1. Add each interface in a new line under dhcp configuration "Exclude interfaces" and save.
  2. SSH to router and check using 'netstat -tulnp' to find that dnsmasq is still listening on all interfaces.
  3. Examine file /tmp/etc/dnsmasq.conf.cfg02411c to check dnsmasq runtime configuration for multiple "except-interface=" lines. Find that there is only one line showing "except-interface=vpn_wg".

In my attmepts to troubleshoot, I've found that the configuration line "except-interface=" appears for some interfaces only, and only one at a time, otherwise the line is completely absent from the runtime configuration.

I've managed to trace the problem to this commit on github:
lede-project/source@5cd88f4

Reverting this commit on my router fixes the problem and now all interfaces specified for exclusion on the dhcp configuration page are properly ignored and multiple "except-interface=" lines exist in the dnsmasq runtime configuration file.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jun 29, 2017

jow-:

Please test the following change:

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index a762cd3309..1ecbb3c689 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -116,12 +116,12 @@ append_ipset() {
 }
 
 append_interface() {
-       network_get_device ifname "$1" || return
+       network_get_device ifname "$1" || ifname="$1"
        xappend "--interface=$ifname"
 }
 
 append_notinterface() {
-       network_get_device ifname "$1" || return
+       network_get_device ifname "$1" || ifname="$1"
        xappend "--except-interface=$ifname"
 }

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jul 10, 2017

ceribik:

I was having the same issue. The patch above fixes the issue for me.

Thanks!

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Oct 25, 2017

7hunderbug:

When will this make it into a release? This problem with dnsmasq still exists in 17.01.4 installed today 25/10/17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant