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

Cannot read properties of null (reading 'remove') #7326

Open
jura43 opened this issue Oct 13, 2024 · 4 comments
Open

Cannot read properties of null (reading 'remove') #7326

jura43 opened this issue Oct 13, 2024 · 4 comments

Comments

@jura43
Copy link

jura43 commented Oct 13, 2024

I fresh installed open-wrt on my Asus AX6000 router. What I configured in DHCP and DNS settings is deleted default instance and created new one with name work. After that I am not able to open DHCP and DNS settings.

Steps to reproduce:

  1. go to: Network → DHCP and DNS

Actual behavior:

image

Additional Information:

root@OpenWrt:~# cat /etc/config/dhcp

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '100'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

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 'Work'
        option start '100'
        option limit '200'
        option leasetime '12h'
        list server '1.1.1.1'
        option rebind_protection '0'
        option localservice '0'
        option interface 'Work'
        list dhcp_option '6,192.168.20.1'

config dhcp 'Guest'
        option interface 'Guest'
        option start '100'
        option limit '200'
        option leasetime '12h'
        list dhcp_option '6,1.1.1.1,1.0.0.1'
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='SNAPSHOT'
DISTRIB_REVISION='r27751-f8c22c9bff'
DISTRIB_TARGET='mediatek/filogic'
DISTRIB_ARCH='aarch64_cortex-a53'
DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r27751-f8c22c9bff'
DISTRIB_TAINTS=
@jura43
Copy link
Author

jura43 commented Oct 13, 2024

I think I am able to reproduce this.
I create interface, enable DHCP server, save. DHCP and DNS page still working. But if I edit DHCP settings in interface windows for example I change range of IP addresses and save. Then DHCP and DNS stop working.
Here is config before and after editing DHCP in interface menu.

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        option filter_aaaa '0'
        option filter_a '0'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

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 'guest'
        option interface 'guest'
        option start '100'
        option limit '150'
        option leasetime '12h'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

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 'guest'
        option interface 'guest'
        option start '100'
        option limit '200'
        option leasetime '12h'

config dhcp 'work'
        option start '100'
        option limit '200'
        option leasetime '12h'
        option rebind_protection '0'
        option localservice '0'
        option interface 'work'
        list server '1.1.1.1'

@systemcrash
Copy link
Contributor

Is there a trackback produced in the browser console?
I could not reproduce this.

@jura43
Copy link
Author

jura43 commented Oct 14, 2024

I manually added config dnsmasq block to dhcp file now I don't have any issues, and not able to reproduce it again. This might seems to be happening only on fresh install, since now I can edit DHCP range with issues.
I checked console, and I if remember correctly it was same message as in Web interface.

@systemcrash
Copy link
Contributor

At a guess, what's happening is the deletion of the first dnsmasq instance, which is anonymous. Anything added after that is a named instance. And dnsmasq handles those slightly differently. Maybe we shouldn't be able to delete the first instance.

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

No branches or pull requests

2 participants