New Build - 12/26/2023 - r54604

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2
Author Message
tli
DD-WRT User


Joined: 06 Mar 2019
Posts: 66

PostPosted: Fri Dec 29, 2023 15:51    Post subject: Asus RT-N66R - Working Reply with quote
Router/Version: Asus RT-N66R
File: dd-wrt.v24-54604_NEWD-2_K3.x-big-RT-N66U.trx
Kernel: Linux 4.4.302-st47 #27683 Tue Dec 26 06:13:37 +06 2023 mips
Previous: dd-wrt.v24-54475_NEWD-2_K3.x-big-RT-N66U.trx
Reset: No
Mode: Gateway Router (with WiFi disabled; separate AP connected via LAN)
Status: All gateway functions seem to be working for my setup.
Running the command 'cat /tmp/dnsmasq.conf', the output value for 'dhcp-lease-max' incorrectly show the setting for 'Maximum DHCP Users'.
Uptime: ~2.5 days
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12923
Location: Netherlands

PostPosted: Fri Dec 29, 2023 16:24    Post subject: Re: Asus RT-N66R - Working Reply with quote
tli wrote:

Running the command 'cat /tmp/dnsmasq.conf', the output value for 'dhcp-lease-max' incorrectly show the setting for 'Maximum DHCP Users'.


No it is not, it could be the same if you do not have set static leases, otherwise it is the max DHCP users + number of static leases.

I know because the Master developer and yours truly have been debating it (I advocated a different approach as static leases could also be set in the Additional config and that is not taken into account, clients with random MAC addresses etc.).

But I failed to convince the Master

Default = 1000
Quote:
-X, --dhcp-lease-max=<number>
Limits dnsmasq to the specified maximum number of DHCP leases. The default is 1000. This limit is to prevent DoS attacks from hosts which create thousands of leases and use lots of memory in the dnsmasq process.


But if you run out of leases you will get a warning in the log and you can always add:
dhcp-lease-max=1000
to the DNSmasq additional config

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
tli
DD-WRT User


Joined: 06 Mar 2019
Posts: 66

PostPosted: Fri Dec 29, 2023 16:53    Post subject: Re: Asus RT-N66R - Working Reply with quote
egc wrote:
No it is not, it could be the same if you do not have set static leases, otherwise it is the max DHCP users + number of static leases.

I know because the Master developer and yours truly have been debating it (I advocated a different approach as static leases could also be set in the Additional config and that is not taken into account, clients with random MAC addresses etc.).

But I failed to convince the Master

Default = 1000
Quote:
-X, --dhcp-lease-max=<number>
Limits dnsmasq to the specified maximum number of DHCP leases. The default is 1000. This limit is to prevent DoS attacks from hosts which create thousands of leases and use lots of memory in the dnsmasq process.


But if you run out of leases you will get a warning in the log and you can always add:
dhcp-lease-max=1000
to the DNSmasq additional config


Thank you for the explanation! Understood now. I'd mistakenly thought the 'dhcp-lease-max' showed the 'Lease Expiration' setting in past builds--at least that's what my backups seemed to indicate. Thanks again!
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1959

PostPosted: Fri Dec 29, 2023 18:04    Post subject: Reply with quote
The nvram variable for 'Maximum DHCP Users' is 'dhcp_num':
Code:
root@TL-WR1043NDv1:~# nvram show | grep dhcp
dhcp6s_enable=0
dhcp_lease=1440
dhcp_domain=lan
l2tp_use_dhcp=1
dhcpc_requestip=
dhcp_start=192.168.1.64
dhcpfwd_ip=0.0.0.0
mdhcpd_count=0
dhcpd_usejffs=
wan_proto=dhcp
dhcpd_options=
lan_proto=dhcp
dhcp6s_seq_ips=0
mdhcpd=
dhcp6c_custom=0
dhcpc_vendorclass=
dhcpd_usenvram=0
dhcp-option=43,01:04:00:00:00:02
dhcp6s_custom=0
dhcp_num=190 ***
pptp_use_dhcp=1
dhcp6c_norelease=0
openvpn_dhcpbl=0
dhcp_wins=wan
dhcpfwd_enable=0

This still limits how many leases will be handed out from what I understand.

"idx.dhcp_maxusers"

https://github.com/mirror/dd-wrt/blob/master/src/router/kromo/dd-wrt/index.asp#L510

https://github.com/mirror/dd-wrt/blob/master/src/router/kromo/dd-wrt/lang_pack/english.js#L1267

https://github.com/mirror/dd-wrt/blob/master/src/router/httpd/visuals/dd-wrt.c#L1041


NVRAM:

https://github.com/mirror/dd-wrt/blob/master/src/router/httpd/visuals/dd-wrt.c#L975

https://github.com/mirror/dd-wrt/blob/master/opt/etc/config/base.nvramconfig#L61

https://github.com/mirror/dd-wrt/blob/master/opt/etc/micro/config/base.nvramconfig#L34

https://github.com/mirror/dd-wrt/blob/master/opt/etc/mini/config/base.nvramconfig#L36

_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
tli
DD-WRT User


Joined: 06 Mar 2019
Posts: 66

PostPosted: Fri Dec 29, 2023 19:02    Post subject: Reply with quote
Thanks dale_gribble39 for the info! This is more consistent with what I've seen with past builds: output value of 'dhcp-lease-max' being 1440.
WouldRatherBeFOSS
DD-WRT User


Joined: 09 Nov 2019
Posts: 116

PostPosted: Mon Jan 01, 2024 3:00    Post subject: Reply with quote
Router: Asus RT-AC66U
Mode: AP
File: dd-wrt-54604-Asus_RT-AC66U.trx
Kernel: Well, the one included in the build.
Reset: no.
Status: WORKING.
Previous build: 52894
Uptime: Two days.
Flashed via: GUI.

_________________
My router: Asus RT-AC66U

Operating systems on devices that I use with that router: GNU-Linux; Windows 10; Android 13
T_o_m
DD-WRT Novice


Joined: 11 Feb 2019
Posts: 10

PostPosted: Mon Jan 01, 2024 15:57    Post subject: Reply with quote
Router/Version: Netgear R6400 v2
Firmware: DD-WRT v3.0-r54604 std (12/26/23)
Kernel: Linux 4.4.302-st47 #10721 SMP Sun Dec 24 09:29:42 +06 2023 armv7l
Previous/Reset: r54475 no
Mode: 1. Gateway, 2.Wireless access point
Issues/Errors: No not this time
dwardo
DD-WRT User


Joined: 07 Feb 2013
Posts: 126
Location: France

PostPosted: Thu Jan 04, 2024 11:02    Post subject: Reply with quote
Router/Version: TP-Link Archer C9 v1
File/Kernel: archer-c9v1-webflash.bin/Linux 4.4.302-st46 #10527 SMP Fri Nov 17 07:56:26 +06 2023 armv7l
Previous/Reset: r54475/no
Mode/Status: Gateway/2.4GHz & 5GHz AP/Openvpn server/Wireguard server/Dnsmasq DHCP&DNS Server/Port forwarding/ipv4 & ipv6/CTF+FA/Entware on /jffs automounted usb key
Issues/Errors: SIGSEV
After a while clients weren't receiving ipv6 adresses via dnsmasq's ipv4/ipv6 dhcp... and suddenly I could not ssh or https into the router which eventually rebooted to a wiped out nvram.
As I have logs (messages) written to a usb key I was able to see what happened.
Extracts below show :
* Cron job (every 2 minutes) which tests ipv6 connectivity [possible cause of clients not getting ipv6 by dhcp] couldn't be lauched "(CRON) could not fork" --> memory issue ?
* Could not access webui via https [with the correct password] with "Authentification fail"
These 2 started an hour before reboot with wiped nvram/configuration
* Could not log in via ssh because of "bogus root user does not exist"
* Reboot and nvram/configration loss seems to have been due to SIGSEV in "httpd thread"


Code:
Jan  3 21:24:00 archy cron.info cron[3750]: (CRON) error (can't fork)
Jan  3 21:24:58 archy daemon.info httpd[3678]: [httpd] : Authentication fail
...
Jan  3 22:22:00 archy cron.info cron[3750]: (CRON) error (can't fork)
Jan  3 22:23:48 archy daemon.info httpd[3678]: [httpd] : Authentication fail
...
Jan  3 22:30:00 archy cron.info cron[3750]: (CRON) error (can't fork)
...
Jan  3 22:41:50 archy authpriv.notice dropbear[9853]: Pubkey auth succeeded for 'root' with ssh-rsa key SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX from fddd::11:32854
Jan  3 22:41:50 archy authpriv.info dropbear[9853]: Exit (root) from <fddd::11:32854>: login_init_entry: Cannot find user "root"
...
Jan  3 22:43:15 archy user.err : Caught SIGSEGV (11) in nvram_used
Jan  3 22:43:15 archy user.err : Fault at memory location 0x00000000 due to address not mapped to object (1).
Jan  3 22:43:15 archy user.err : Postinfo: {clkfreq::
Jan  3 22:43:15 archy user.err : Postinfo: get_clkfreq
Jan  3 22:43:15 archy user.err : Postinfo: 1000
Jan  3 22:43:15 archy user.err : Postinfo: }
Jan  3 22:43:15 archy user.err : Postinfo: {uptime::
Jan  3 22:43:15 archy user.err : Postinfo: get_uptime
Jan  3 22:43:15 archy user.err : Postinfo:  %02u:%02u:%02u up
Jan  3 22:43:15 archy user.err : Postinfo: %2u:%02u
Jan  3 22:43:15 archy user.err : Postinfo: , 
Jan  3 22:43:15 archy user.err : Postinfo: load average: %u.%02u, %u.%02u, %u.%02u
Jan  3 22:43:15 archy user.err : Postinfo: }
Jan  3 22:43:15 archy user.err : Postinfo: {ip_conntrack::
Jan  3 22:43:15 archy user.err : Postinfo: dumpip_conntrack
Jan  3 22:43:15 archy user.err : Postinfo: %d
Jan  3 22:43:15 archy user.err : Postinfo: }
Jan  3 22:43:15 archy user.err : Postinfo: {cpu_temp::
Jan  3 22:43:15 archy user.err : Postinfo: get_cputemp
Jan  3 22:43:15 archy user.err : Postinfo: CPU %d.%d °C /
Jan  3 22:43:15 archy user.err : Postinfo: WL%d %d.%d °C
Jan  3 22:43:15 archy user.err : Postinfo:  /
Jan  3 22:43:15 archy user.err : Postinfo: WL%d %d.%d °C
Jan  3 22:43:15 archy user.err : Postinfo: }
Jan  3 22:43:15 archy user.err : Postinfo: {voltage::
Jan  3 22:43:15 archy user.err : Postinfo: get_voltage
Jan  3 22:43:15 archy user.err : Postinfo: }
Jan  3 22:43:15 archy user.err : Postinfo: {ipinfo::
Jan  3 22:43:15 archy user.err : Postinfo: show_wanipinfo
Jan  3 22:43:15 archy user.err : Postinfo: &nbsp;IPv4: %s
Jan  3 22:43:15 archy user.err : Postinfo: &nbsp;IPv6: %s
Jan  3 22:43:15 archy user.err : Postinfo: }
Jan  3 22:43:15 archy user.err : Postinfo: {nvram::
Jan  3 22:43:15 archy user.err : Postinfo: statnv
Jan  3 22:43:15 archy user.err : Thread 9903: httpd
Jan  3 22:43:15 archy user.err : maps:
Jan  3 22:43:15 archy user.err : 00010000-0007c000 r-xp 00000000 1f:02 1430       /usr/sbin/httpd
Jan  3 22:43:15 archy user.err : 0007c000-0007d000 r--p 0006b000 1f:02 1430       /usr/sbin/httpd
Jan  3 22:43:15 archy user.err : 0007d000-0007f000 rw-p 0006c000 1f:02 1430       /usr/sbin/httpd
Jan  3 22:43:15 archy user.err : 0007f000-00086000 rw-p 00000000 00:00 0          [heap]
Jan  3 22:43:15 archy user.err : 00086000-00087000 ---p 00000000 00:00 0          [heap]
Jan  3 22:43:15 archy user.err : 00087000-00089000 rw-p 00000000 00:00 0          [heap]
Jan  3 22:43:15 archy user.err : 76b71000-76bb1000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76bd4000-76bdc000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76bdc000-76bde000 ---p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76bde000-76c01000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76c0c000-76c10000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76c1c000-76c1d000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76c21000-76c43000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76c43000-76c46000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76c47000-76c49000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76c49000-76c51000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76c51000-76c61000 r--s 00000000 00:0e 1094       /dev/nvram
Jan  3 22:43:15 archy user.err : 76c61000-76c78000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76c78000-76c79000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76c79000-76c7a000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76c7a000-76c86000 r-xp 00000000 1f:02 864        /lib/libgcc_s.so.1
Jan  3 22:43:15 archy user.err : 76c86000-76c87000 r--p 0000b000 1f:02 864        /lib/libgcc_s.so.1
Jan  3 22:43:15 archy user.err : 76c87000-76c88000 rw-p 0000c000 1f:02 864        /lib/libgcc_s.so.1
Jan  3 22:43:15 archy user.err : 76c88000-76c8a000 r-xp 00000000 1f:02 1323       /usr/lib/libsharetools.so
Jan  3 22:43:15 archy user.err : 76c8a000-76c8b000 r--p 00001000 1f:02 1323       /usr/lib/libsharetools.so
Jan  3 22:43:15 archy user.err : 76c8b000-76c8c000 rw-p 00002000 1f:02 1323       /usr/lib/libsharetools.so
Jan  3 22:43:15 archy user.err : 76c8c000-76c95000 r-xp 00000000 1f:02 1298       /usr/lib/libjansson.so.4.11.1
Jan  3 22:43:15 archy user.err : 76c95000-76c96000 r--p 00008000 1f:02 1298       /usr/lib/libjansson.so.4.11.1
Jan  3 22:43:15 archy user.err : 76c96000-76c97000 rw-p 00009000 1f:02 1298       /usr/lib/libjansson.so.4.11.1
Jan  3 22:43:15 archy user.err : 76c97000-76c9d000 r-xp 00000000 1f:02 1308       /usr/lib/libnl-tiny.so
Jan  3 22:43:15 archy user.err : 76c9d000-76c9e000 r--p 00005000 1f:02 1308       /usr/lib/libnl-tiny.so
Jan  3 22:43:15 archy user.err : 76c9e000-76c9f000 rw-p 00006000 1f:02 1308       /usr/lib/libnl-tiny.so
Jan  3 22:43:15 archy user.err : 76c9f000-76ca2000 r-xp 00000000 1f:02 1326       /usr/lib/libswitch.so
Jan  3 22:43:15 archy user.err : 76ca2000-76ca3000 r--p 00002000 1f:02 1326       /usr/lib/libswitch.so
Jan  3 22:43:15 archy user.err : 76ca3000-76ca4000 rw-p 00003000 1f:02 1326       /usr/lib/libswitch.so
Jan  3 22:43:15 archy user.err : 76ca4000-76cb3000 r-xp 00000000 1f:02 1324       /usr/lib/libshutils.so
Jan  3 22:43:15 archy user.err : 76cb3000-76cb4000 r--p 0000e000 1f:02 1324       /usr/lib/libshutils.so
Jan  3 22:43:15 archy user.err : 76cb4000-76cb6000 rw-p 0000f000 1f:02 1324       /usr/lib/libshutils.so
Jan  3 22:43:15 archy user.err : 76cb6000-76cc0000 r-xp 00000000 1f:02 1337       /usr/lib/libwireless.so
Jan  3 22:43:15 archy user.err : 76cc0000-76cc2000 r--p 00009000 1f:02 1337       /usr/lib/libwireless.so
Jan  3 22:43:15 archy user.err : 76cc2000-76cc3000 rw-p 0000b000 1f:02 1337       /usr/lib/libwireless.so
Jan  3 22:43:15 archy user.err : 76cc3000-76ce4000 r-xp 00000000 1f:02 1333       /usr/lib/libutils.so
Jan  3 22:43:15 archy user.err : 76ce4000-76ce9000 r--p 00020000 1f:02 1333       /usr/lib/libutils.so
Jan  3 22:43:15 archy user.err : 76ce9000-76ceb000 rw-p 00025000 1f:02 1333       /usr/lib/libutils.so
Jan  3 22:43:15 archy user.err : 76ceb000-76cec000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76cec000-76cf2000 r-xp 00000000 1f:02 865        /lib/libnvram.so
Jan  3 22:43:15 archy user.err : 76cf2000-76cf3000 r--p 00006000 1f:02 865        /lib/libnvram.so
Jan  3 22:43:15 archy user.err : 76cf3000-76cf4000 rw-p 00007000 1f:02 865        /lib/libnvram.so
Jan  3 22:43:15 archy user.err : 76cf4000-76e74000 r-xp 00000000 1f:02 1283       /usr/lib/libcrypto.so.1.1
Jan  3 22:43:15 archy user.err : 76e74000-76e84000 r--p 00180000 1f:02 1283       /usr/lib/libcrypto.so.1.1
Jan  3 22:43:15 archy user.err : 76e84000-76e86000 rw-p 00190000 1f:02 1283       /usr/lib/libcrypto.so.1.1
Jan  3 22:43:15 archy user.err : 76e86000-76e87000 rw-p 00000000 00:00 0
Jan  3 22:43:15 archy user.err : 76e87000-76ed7000 r-xp 00000000 1f:02 1325       /usr/lib/libssl.so.1.1
Jan  3 22:43:15 archy user.err : 76ed7000-76edb000 r--p 0004f000 1f:02 1325       /usr/lib/libssl.so.1.1
Jan  3 22:43:15 archy user.err : 76edb000-76ede000 rw-p 00053000 1f:02 1325       /usr/lib/libssl.so.1.1
Jan  3 22:43:16 archy user.err : 76ede000-76f58000 r-xp 00000000 1f:02 863        /lib/libc.so
Jan  3 22:43:16 archy user.err : 76f58000-76f5a000 rw-p 00079000 1f:02 863        /lib/libc.so
Jan  3 22:43:16 archy user.err : 76f5a000-76f5c000 rw-p 00000000 00:00 0
Jan  3 22:43:16 archy user.err : 7eb80000-7eba1000 rw-p 00000000 00:00 0          [stack]
Jan  3 22:43:16 archy user.err : 7ebc3000-7ebc4000 r-xp 00000000 00:00 0          [sigpage]
Jan  3 22:43:16 archy user.err : 7ebc4000-7ebc5000 r--p 00000000 00:00 0          [vvar]
Jan  3 22:43:16 archy user.err : 7ebc5000-7ebc6000 r-xp 00000000 00:00 0          [vdso]
Jan  3 22:43:16 archy user.err : ffff0000-ffff1000 r-xp 00000000 00:00 0          [vectors]
Jan  3 22:43:16 archy user.err : === Context:
Jan  3 22:43:16 archy user.err :    TRAPNO:0000000e   ERRCODE:00000017   OLDMASK:00000000        R0:fffffff4
Jan  3 22:43:16 archy user.err :        R1:000026af        R2:00000000        R3:76f590f4        R4:00000000
Jan  3 22:43:16 archy user.err :        R5:00000000        R6:0002902c        R7:00000001        R8:0007ae18
Jan  3 22:43:16 archy user.err :        R9:76bfeab8       R10:76bfea78        FP:0007aa68        IP:76bfe96b
Jan  3 22:43:16 archy user.err :        SP:76bfe9e8        LR:76cee8c0        PC:76ceeab4      CPSR:400f0010
Jan  3 22:43:16 archy user.err : FAULTADDR:00000000
Jan  3 22:43:16 archy user.err : === Backtrace:
Jan  3 22:43:16 archy user.err : # Searching frame 0 (FP=0x0007aa68, PC=0x76ceeab4)
Jan  3 22:43:16 archy user.err : # Failed to find prior stack frame; terminating backtrace.
Jan  3 22:43:16 archy user.err : /lib/libnvram.so[0x76cec000](nvram_used+0x00000040)[0x76ceeab4]
Jan  3 22:43:16 archy user.err : === Code:
Jan  3 22:43:16 archy user.err : 76ceea74:  e92d4070 e1a05000 ebfffea8 e3500000 13e04000 1a000010 e59f3058 e08f3003
Jan  3 22:43:16 archy user.err : 76ceea94:  e5934004 e5854000 e1a00004 ebfffdc9 e1a05000 e1a01004 e1a04005 ebfffdb3
Jan  3 22:43:16 archy user.err : 76ceeab4: >e5d43000 e3530000 1a000005 e2653014 e1a00005 e0844003 ebfffe60 e1a00004
Jan  3 22:43:16 archy user.err : 76ceead4:  e8bd8070 e1a00004 ebfffe44 e2800001 e0844000 eafffff1 00004690 e59f11c8


Upon restoring my configuraiton I also upgraded to r54682
dwardo
DD-WRT User


Joined: 07 Feb 2013
Posts: 126
Location: France

PostPosted: Thu Jan 04, 2024 19:04    Post subject: Re: Asus RT-N66R - Working Reply with quote
egc wrote:



I know because the Master developer and yours truly have been debating it (I advocated a different approach as static leases could also be set in the Additional config and that is not taken into account, clients with random MAC addresses etc.).

But I failed to convince the Master



If you have ipv6 dhcp enabled you can at least also double whatever you calculated for just ipv4...


I have settled on 3x "Maximum DHCP Users" from the web gui as
* As my static ipv4 leases are all in the DHCP range [which is allowed per dnsmasq manual]
* I hand out public ipv6 and private ipv6 to the DHCP clients (privates for convenience as they are simpler to type when dns is down)
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum