diff options
author | Andrey Erokhin <a.erokhin@inango-systems.com> | 2023-03-07 16:52:58 +0500 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2023-04-01 22:40:35 +0200 |
commit | 506bb436c678779e8ee54e83a7fb3e4e880037ec (patch) | |
tree | 2f11a40b72fd62af0c956212c8df5af6cbedffc1 /package/network | |
parent | fdc857358747fcf0c905779e3f114af66feeab1a (diff) | |
download | upstream-506bb436c678779e8ee54e83a7fb3e4e880037ec.tar.gz upstream-506bb436c678779e8ee54e83a7fb3e4e880037ec.tar.bz2 upstream-506bb436c678779e8ee54e83a7fb3e4e880037ec.zip |
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>
Diffstat (limited to 'package/network')
-rwxr-xr-x | package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh index ea6d872eb4..636b4654ff 100755 --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh @@ -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 |