From: Florian Eckert Date: Fri, 27 Sep 2024 13:19:05 +0000 (+0200) Subject: Revert "mwan3: use network_get_preferred_ipaddr6" X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=1b9a6ae47a7a8280875dd20f28bda5cb83055522;p=openwrt-packages.git Revert "mwan3: use network_get_preferred_ipaddr6" This reverts commit fc3cc2fe5c33b36014178d3652785d00cae1c9eb. As long as the related pullrequest [1] is not merged, this change must be revert. [1] https://github.com/openwrt/openwrt/pull/14333 Signed-off-by: Florian Eckert --- diff --git a/net/mwan3/Makefile b/net/mwan3/Makefile index 0108d178f..92dce30a7 100644 --- a/net/mwan3/Makefile +++ b/net/mwan3/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mwan3 PKG_VERSION:=2.11.15 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_MAINTAINER:=Florian Eckert , \ Aaron Goodman PKG_LICENSE:=GPL-2.0 diff --git a/net/mwan3/files/lib/mwan3/common.sh b/net/mwan3/files/lib/mwan3/common.sh index 3778cc46c..ecd45026e 100644 --- a/net/mwan3/files/lib/mwan3/common.sh +++ b/net/mwan3/files/lib/mwan3/common.sh @@ -61,20 +61,18 @@ mwan3_get_src_ip() unset "$1" config_get family "$interface" family ipv4 if [ "$family" = "ipv4" ]; then - addr_cmd_1='network_get_ipaddr' - addr_cmd_2='false' + addr_cmd='network_get_ipaddr' default_ip="0.0.0.0" sed_str='s/ *inet \([^ \/]*\).*/\1/;T; pq' IP="$IP4" elif [ "$family" = "ipv6" ]; then - addr_cmd_1='network_get_preferred_ipaddr6' - addr_cmd_2='network_get_ipaddr6' + addr_cmd='network_get_ipaddr6' default_ip="::" sed_str='s/ *inet6 \([^ \/]*\).* scope.*/\1/;T; pq' IP="$IP6" fi - $addr_cmd_1 _src_ip "$true_iface" 2>&1 || $addr_cmd_2 _src_ip "$true_iface" + $addr_cmd _src_ip "$true_iface" if [ -z "$_src_ip" ]; then network_get_device device $true_iface _src_ip=$($IP address ls dev $device 2>/dev/null | sed -ne "$sed_str")