Revert "mwan3: use network_get_preferred_ipaddr6"
authorFlorian Eckert <[email protected]>
Fri, 27 Sep 2024 13:19:05 +0000 (15:19 +0200)
committerFlorian Eckert <[email protected]>
Fri, 27 Sep 2024 13:22:09 +0000 (15:22 +0200)
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 <[email protected]>
net/mwan3/Makefile
net/mwan3/files/lib/mwan3/common.sh

index 0108d178fe24b31501647c95c3b425cf01d7dfc5..92dce30a7aa460933319e1cf1c545f1a835f31ae 100644 (file)
@@ -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 <[email protected]>, \
                Aaron Goodman <[email protected]>
 PKG_LICENSE:=GPL-2.0
index 3778cc46cd361529e0fe016f283dcddb1f5bc484..ecd45026e8db6c863889d4f3105726b0c4c3ff2f 100644 (file)
@@ -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")