Something looks broken to dnsmasq.d

Hello,

I'm aware of a few recent changes to dnsmasq behaviour, one of them is having multiple dnsmasq instances in recent commits, the other one might have changed how dnsmasq.d works though i have readed about these commit some time ago so i cannot get them 123 in front of me.

though i think this still cause some issues for example i noted that luci-app-nextdns seem not to work properly anymore, it does if you disable dns on wan and add the ip and port as dns forwarder.

from what i could gather is that nextdns creates a dnsmasq.d file in /tmp/dnsmasq.d however in recent snapshots from the main branch this seem to not be readed anymore by dnsmasq, i also noticed pbr also seem to be affected by this.

So i saw another map in /tmp, dnsmasq.cfg01411c.d so i copied the files there and now the nextdns and pbr work as expected.

Is this some kind of regression?, or could it be i misconfigurated something?

i only use one instance and sysupgraded with keeping te settings.

Ubus (custom build with argon and 256qam patches):

MT6000:/tmp# ubus call system board
{
        "kernel": "6.6.57",
        "hostname": "MT6000",
        "system": "ARMv8 Processor rev 4",
        "model": "GL.iNet GL-MT6000",
        "board_name": "glinet,gl-mt6000",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "SNAPSHOT",
                "description": "OpenWrt SNAPSHOT",
                "revision": "r27892+175-776be23f87",
                "target": "mediatek/filogic",
                "builddate": "1729614001"
        }
}

dhcp:

config dnsmasq
        option rebind_protection '0'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '1'
        option ednspacket_max '1232'
        option sequential_ip '1'
        option domainneeded '1'
        option localise_queries '1'
        option dnsseccheckunsigned '0'

config dhcp 'lan'
        option interface 'lan'
        option start '2'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

config dhcp 'aria'
        option interface 'aria'
        option start '2'
        option limit '150'
        option leasetime '12h'

config dhcp 'pcnet'
        option interface 'pcnet'
        option start '2'
        option limit '150'
        option leasetime '12h'

config dhcp 'wlan0'
        option interface 'wlan0'
        option start '2'
        option limit '150'
        option leasetime '12h'
        list dhcp_option '43,"android-dhcp-14"' <- just noticed this, don't know why that is there.

config dhcp 'wlan1'
        option interface 'wlan1'
        option start '2'
        option limit '150'
        option leasetime '12h'

config dhcp 'iot'
        option interface 'iot'
        option start '2'
        option limit '150'
        option leasetime '12h'

config dhcp 'tvnet'
        option interface 'tvnet'
        option start '2'
        option limit '150'
        option leasetime '12h'

config dhcp 'ps5'
        option interface 'ps5'
        option start '2'
        option limit '150'
        option leasetime '12h'

config dhcp 'ayaneo'
        option interface 'ayaneo'
        option start '2'
        option limit '150'
        option leasetime '12h'

config dhcp 'aqaranet'
        option interface 'aqaranet'
        option start '2'
        option limit '150'
        option leasetime '12h'
        option ra_useleasetime '1'

config dhcp 'hwnet'
        option interface 'hwnet'
        option start '2'
        option limit '150'
        option leasetime '12h'

config dhcp 'tvboxnet'
        option interface 'tvboxnet'
        option start '2'
        option limit '150'
        option leasetime '12h'

network:

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option packet_steering '2'
        option steering_flows '128'
        option ula_prefix 'fd4b:cc95:587d::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        option ipv6 '0'
        option igmp_snooping '1'
        option multicast_querier '0'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'
        list ports 'lan5'

config interface 'lan'
        option device 'br-lan.169'
        option proto 'static'
        option ipaddr '10.234.53.1'
        option netmask '255.255.255.0'
        option delegate '0'

config interface 'wan'
        option proto 'pppoe'
        option device 'eth1.6'
        option username 'snip'
        option password 'ppp'
        option ipv6 '0'
        option sourcefilter '0'
        option delegate '0'
        option classlessroute '0'
        option mtu '1500'

config bridge-vlan
        option device 'br-lan'
        option vlan '169'
        list ports 'lan1:u*'
        list ports 'lan2:u*'
        list ports 'lan3:u*'
        list ports 'lan4:u*'
        list ports 'lan5:u*'

config bridge-vlan
        option device 'br-lan'
        option vlan '49'
        list ports 'lan1:t'
        list ports 'lan2:t'
        list ports 'lan4:t'
        list ports 'lan5:t'

config bridge-vlan
        option device 'br-lan'
        option vlan '6'
        list ports 'lan3:t'

config bridge-vlan
        option device 'br-lan'
        option vlan '53'
        list ports 'lan1:t'
        list ports 'lan2:t'
        list ports 'lan4:t'
        list ports 'lan5:t'

config bridge-vlan
        option device 'br-lan'
        option vlan '89'
        list ports 'lan1:t'
        list ports 'lan2:t'
        list ports 'lan4:t'
        list ports 'lan5:t'

config interface 'aria'
        option proto 'static'
        option device 'br-lan.6'
        option ipaddr '192.168.99.1'
        option netmask '255.255.255.0'
        option defaultroute '0'
        option delegate '0'

config interface 'pcnet'
        option proto 'static'
        option device 'br-lan.49'
        option ipaddr '10.34.79.1'
        option netmask '255.255.255.0'
        option defaultroute '0'
        option delegate '0'

config interface 'wlan0'
        option proto 'static'
        option device 'br-lan.50'
        option ipaddr '10.234.80.1'
        option netmask '255.255.255.0'
        option defaultroute '0'
        option delegate '0'

config interface 'wlan1'
        option proto 'static'
        option device 'br-lan.51'
        option ipaddr '10.234.81.1'
        option netmask '255.255.255.0'
        option defaultroute '0'
        option delegate '0'

config interface 'iot'
        option proto 'static'
        option device 'br-lan.52'
        option ipaddr '10.33.77.1'
        option netmask '255.255.255.0'
        option defaultroute '0'
        option delegate '0'

config interface 'tvnet'
        option proto 'static'
        option device 'br-lan.53'
        option ipaddr '172.22.33.1'
        option netmask '255.255.255.0'
        option defaultroute '0'
        option delegate '0'

config interface 'ps5'
        option proto 'static'
        option device 'br-lan.89'
        option ipaddr '10.56.2.1'
        option netmask '255.255.255.0'
        option defaultroute '0'
        option delegate '0'

config interface 'ayaneo'
        option proto 'static'
        option device 'br-lan.90'
        option ipaddr '10.87.32.1'
        option netmask '255.255.255.0'
        option defaultroute '0'
        option delegate '0'

config interface 'aqaranet'
        option proto 'static'
        option device 'br-lan.178'
        option ipaddr '10.233.10.1'
        option netmask '255.255.255.0'
        option defaultroute '0'
        option delegate '0'

config interface 'hwnet'
        option proto 'static'
        option device 'br-lan.179'
        option ipaddr '10.182.32.1'
        option netmask '255.255.255.0'
        option defaultroute '0'
        option delegate '0'

config interface 'wifivpn'
        option proto 'wireguard'
        option private_key 'snip'
        option listen_port '51820'
        list addresses '10.39.95.1/24'
        option defaultroute '0'
        option multicast '1'
        option delegate '0'
        option mtu '1500'

config wireguard_wifivpn
        option description 'poco-x6-pro'
        option public_key 'snip'
        option private_key 'snip'
        option preshared_key 'snip'
        option endpoint_port '51820'
        option persistent_keepalive '25'
        list allowed_ips '10.39.95.2/32'

config interface 'wgclient'
        option proto 'wireguard'
        option private_key 'snip'
        list addresses '10.64.132.53/32'
        option defaultroute '0'
        option mtu '1500'
        option force_link '1'
        option delegate '0'
        list dns '10.64.0.1'

config wireguard_wgclient
        option description 'Netherlands_nl-ams-wg-001'
        list allowed_ips '0.0.0.0/0'
        option endpoint_host '193.32.249.66'
        option endpoint_port '3004'
        option persistent_keepalive '0'
        option public_key 'snip'
        option disabled '1'

config bridge-vlan
        option device 'br-lan'
        option vlan '23'
        list ports 'lan1:t'
        list ports 'lan2:t'
        list ports 'lan4:t'
        list ports 'lan5:t'

config interface 'tvboxnet'
        option proto 'static'
        option device 'br-lan.23'
        option ipaddr '192.168.59.1'
        option netmask '255.255.255.0'
        option defaultroute '0'
        option delegate '0'

config interface 'wgserver'
        option proto 'wireguard'
        option private_key 'snip'
        option listen_port '4443'
        list addresses '10.6.7.1/24'
        option force_link '1'
        option defaultroute '0'
        option delegate '0'
        option mtu '1500'

config wireguard_wgserver
        option description 'MT3000'
        option public_key 'snip'
        option endpoint_port '4443'
        list allowed_ips '10.6.7.2/32'
        option private_key 'snip'
        option persistent_keepalive '25'
        option endpoint_host 'snip'
        option route_allowed_ips '1'

config wireguard_wgserver
        option description 'Testpeer'
        option public_key 'snip'
        option private_key 'snip'
        option preshared_key 'snip'
        list allowed_ips '10.6.7.3/32'
        option endpoint_host 'snip'
        option endpoint_port '4444'
        option persistent_keepalive '25'

config bridge-vlan
        option device 'br-lan'
        option vlan '90'
        list ports 'lan1:t'
        list ports 'lan2:t'
        list ports 'lan4:t'
        list ports 'lan5:t'

config bridge-vlan
        option device 'br-lan'
        option vlan '52'
        list ports 'lan1:t'
        list ports 'lan2:t'
        list ports 'lan4:t'
        list ports 'lan5:t'

config bridge-vlan
        option device 'br-lan'
        option vlan '178'
        list ports 'lan1:t'
        list ports 'lan2:t'
        list ports 'lan4:t'
        list ports 'lan5:t'

config bridge-vlan
        option device 'br-lan'
        option vlan '50'
        list ports 'lan1:t'
        list ports 'lan2:t'
        list ports 'lan4:t'
        list ports 'lan5:t'

config bridge-vlan
        option device 'br-lan'
        option vlan '51'
        list ports 'lan1:t'
        list ports 'lan2:t'
        list ports 'lan4:t'
        list ports 'lan5:t'

config bridge-vlan
        option device 'br-lan'
        option vlan '179'
        list ports 'lan1:t'
        list ports 'lan2:t'
        list ports 'lan4:t'
        list ports 'lan5:t'

config interface 'vx0'
        option proto 'vxlan'
        option peeraddr '10.6.7.2'
        option tunlink 'wgserver'
        option defaultroute '0'
        option delegate '0'
        option vid '4921'
        option ipaddr '10.6.7.1'
        option rxcsum '0'
        option txcsum '0'

config device
        option type 'bridge'
        option name 'br-vxlan'
        list ports 'vx0'
        option mtu '1500'

config bridge-vlan
        option device 'br-vxlan'
        option vlan '50'
        list ports 'vx0:t'

config bridge-vlan
        option device 'br-vxlan'
        option vlan '51'
        list ports 'vx0:t'

config bridge-vlan
        option device 'br-vxlan'
        option vlan '89'
        list ports 'vx0:t'

config bridge-vlan
        option device 'br-vxlan'
        option vlan '90'
        list ports 'vx0:t'

config route
        option interface 'wifivpn'
        option target '224.0.0.0/4'
        option type 'multicast'
        option table 'main'

Many thanks :+1:

Well, in case of pbr it wouldn't be too much work to accommodate the new default directory for dnsmasq instances confdir, but it would mean that the snapshots version would no longer be init-script compatible with the OpenWrt 23.05 (which is what I test on).

Since there's currently no way for the packages to find out what the default confdir directory is for dnsmasq instances, I've created a PR to revert the previous commit: https://github.com/openwrt/openwrt/pull/16806. Feel free to comment there with the list of packages the previous commit broke.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.