netifd: strip mask from IP address in DHCP client params

ipaddr option can be in CIDR notation,
but udhcp wants just an IP address

Signed-off-by: Andrey Erokhin <a.erokhin@inango-systems.com>
This commit is contained in:
Andrey Erokhin 2023-03-07 16:52:58 +05:00 committed by Hauke Mehrtens
parent fdc8573587
commit 506bb436c6

View File

@ -67,7 +67,7 @@ proto_dhcp_setup() {
-p /var/run/udhcpc-$iface.pid \
-s /lib/netifd/dhcp.script \
-f -t 0 -i "$iface" \
${ipaddr:+-r $ipaddr} \
${ipaddr:+-r ${ipaddr/\/*/}} \
${hostname:+-x "hostname:$hostname"} \
${vendorid:+-V "$vendorid"} \
$clientid $defaultreqopts $broadcast $norelease $dhcpopts