After updating a RUTX11 to Firmware 7.21, I noticed a couple of undocumented changes related to DHCP option 43:
- This was silently added to my config during the upgrade (my RUTX LAN IP):
list dhcp_option '43,192.168.191.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
