Problem with new Site Manager DHCP option 43 override in Firmware 7.21

After updating a RUTX11 to Firmware 7.21, I noticed a couple of undocumented changes related to DHCP option 43:

  1. This was silently added to my config during the upgrade (my RUTX LAN IP):
list dhcp_option '43,192.168.191.1'
  1. I found a new hotplug helper script at /etc/hotplug.d/iface/25-dnsmasq_lan-option43

Here are its contents:

#!/bin/sh

[ "$ACTION" = "ifup" ] || exit 0

case "$INTERFACE" in
	lan*)
		;;
	*)
		exit 0
		;;
esac

IP=$(ubus call network.interface."$INTERFACE" status | jsonfilter -e '@["ipv4-address"][0].address')

for opt in $(uci -q get dhcp."$INTERFACE".dhcp_option); do
	case "$opt" in
		43,*)
			uci del_list dhcp."$INTERFACE".dhcp_option="$opt"
			;;
	esac
done

uci add_list dhcp."$INTERFACE".dhcp_option="43,$IP"
uci commit dhcp

/etc/init.d/dnsmasq reload

My quick analysis of this script: it seems to indiscriminately remove any option 43 setting on any LAN-type interfaces, and replace it with the IP of the unit itself. I couldn’t find any mention of this new behavior anywhere, and as I use Option43 to point devices at my Unifi controller, this is highly undesirable.

I assume this is plumbing to make the new Site Manager feature work, however if one is NOT using that feature, it should be optional and explicitly noted!

May I suggest adding this small modification to the top of the script?

SITEMAN_ENABLED=$(uci -q get siteman.general.enabled)
[ "$SITEMAN_ENABLED" != 1 ] && exit 0
1 Like

Greetings,

Thank you for bringing this to our attention. I have forwarded the information to our research and development department. Once I get their feedback, I will get back to you.

Best Regards,
Justinas

Greetings,

This issue will be fixed in the 7.21.2 firmware release.

Best Regards,
Justinas

Thank you that is good news!

I see the fix was implemented in today’s 7.21.2 release. The filename changed from 25-dnsmasq_lan-option43 to 25-dnsmasq_lan-option-siteman, and the guard was added to the top.

Thank you again!

I rebooted my RUTX11 today that was running 7.21.2

After rebooting, I noticed that the DHCP advanced page had some strange configuration

And the raw /etc/config/dhcp looked like this (duplicate option 43)

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option relay_enabled '0'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option ra 'server'
	option ra_slaac '1'
	option dhcpv6 'server'
	option leasetime '12h'
	list dhcp_option '43'
	list dhcp_option '43,192.168.191.1'
	option force '0'

Seems there may still be a bug around this?

1 Like

After updating the 7.21.3 and rebooting, the phantom option 43 seemed to disappear. Will keep posted.