mirror of
https://github.com/unraid/webgui.git
synced 2026-01-10 11:40:12 -06:00
rc.inet1: remove leading zeros in IPv4 address
This commit is contained in:
@@ -381,7 +381,7 @@ ipaddr_up(){
|
||||
if [[ -n $ADDR ]]; then
|
||||
A=(${ADDR//./ })
|
||||
# remove leading zeros
|
||||
for x in {0..3}; do A[$x]=$((10#${A[$x]})); done
|
||||
for x in ${!A[@]}; do A[$x]=$((10#${A[$x]})); done
|
||||
A=${A[@]}
|
||||
ADDR=${A// /.}
|
||||
[[ $j -eq 0 ]] && MASK=${NETMASK[$i]} || MASK=${NETMASK[$i,$j]}
|
||||
|
||||
Reference in New Issue
Block a user