[FS#3869] odhcpd: ra_flags 'none' setting possibly stopped working

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Fri Jun 11 12:30:56 PDT 2021


A new Flyspray task has been opened.  Details are below. 

User who did this - Ben (sq-bb) 

Attached to Project - OpenWrt/LEDE Project
Summary - odhcpd: ra_flags 'none' setting possibly stopped working
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - I recently updated my Raspberry Pi 4 (bcm2711) to a new build of OpenWrt's master branch, and noticed that NetworkManager on my laptop started taking much longer to report a successful connection to my network. The Pi is not the wireless AP in my network, but it is the router and it runs odhcpd (the full variant). I narrowed the commit that caused the slow down to the recent odhcpd version bump (OpenWrt commit 4fd4e9997a116d7bfc6a21bb5b8eadaa30a3a9e7), and indeed, replacing odhcpd with the older version from 21.02 rc2 fixed the problem.

My /etc/config/dhcp is as follows:
config odhcpd 'odhcpd'
	option maindhcp '1'

config dhcp 'lan'
	option dhcpv4 'server'
	option limit '155'
	option ra 'server'
	list ra_flags 'none'

There are only 3 new commits in the odhcpd bump, and going through them, my (untrained, non-programmer) eye thinks the problem might be commit a12fcb3cee2d489b8648a2398812d7bed2f25faa "config: log config parse failures to syslog". Which removed an initialization of ra_flags to 0. My assumption is that the ra_flags 'none' uci setting is no longer being set correctly, and the router advertisements on my SLAAC-only network are advertising the 'other-config' flag, but there is no dhcpv6 server running, so NetworkManager is stuck waiting until its dhcpv6 attempts timeout, hence the slow down. If I include the odchpd patch below in my local tree and recompile, the problem is fixed, which seems to support this theory. :)

--- a/src/config.c
+++ b/src/config.c
@@ -778,6 +778,7 @@
 	if ((c = tb[IFACE_ATTR_RA_FLAGS])) {
+		iface->ra_flags = 0;
 		if (parse_ra_flags(&iface->ra_flags, c) < 0)
 			syslog(LOG_ERR, "Invalid %s value configured for interface '%s'",
 			       iface_attrs[IFACE_ATTR_RA_FLAGS].name, iface->name);

More information can be found at the following URL:

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.

More information about the openwrt-bugs mailing list