fff-babeld: Simplify CIDR mask removal
The removal of CIDR masks from ip addresses is changed to utilize variable substitutions, which simplifies the expression. Signed-off-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
parent
815acc6600
commit
34de39ff41
|
@ -49,7 +49,7 @@ babel_add_peeraddr() {
|
|||
uci add_list "$option"="$ip"
|
||||
elif ipaddr=$(uci -q get gateway.@client[0].ipaddr); then
|
||||
# use client interface address (without subnet) if no router_ip is set
|
||||
uci add_list "$option"=$(echo $ipaddr | cut -d / -f1)
|
||||
uci add_list "$option"=${ipaddr%%/*}
|
||||
else
|
||||
echo "WARNING: No peer_ip, router_ip or client interface ipaddr set! IPv4 routing is not possible."
|
||||
return 1
|
||||
|
|
Loading…
Reference in New Issue