[LEDE-DEV] /lib/functions/network.sh & ip6ifaceid

Eric Masson emss at free.fr
Thu Jun 8 06:26:50 PDT 2017


Le 08/06/2017 à 13:57, Hans Dedecker a écrit :

Hi Hans,

> Meanwhile the issue has been fixed by jow on trunk
> (https://git.lede-project.org/?p=source.git;a=commit;h=7f91cabd0d5b6e1a716d9e3fab4103730d9d2888)
> and lede-17.0.1 branch
> (https://git.lede-project.org/?p=source.git;a=commit;h=df4363b607629710240dcaccf4e3f0bc6fae93ae)

Great, it seems to me that network_get_ipaddrs_all() still has the problem :

> # determine all IP addresses of given logical interface
> # 1: destination variable
> # 2: interface
> network_get_ipaddrs_all() {
> 	local __addr
> 	local __list=""
> 
> 	if __network_ifstatus "__addr" "$2" "['ipv4-address','ipv6-address','ipv6-prefix-assignment'][*].address"; then
> 		for __addr in $__addr; do
> 			case "$__addr" in
> 				*:) __list="${__list:+$__list }${__addr}1" ;; Hardcoded value 1
> 				*)  __list="${__list:+$__list }${__addr}"  ;;
> 			esac
> 		done
> 
> 		export "$1=$__list"
> 		return 0
> 	fi
> 
> 	unset "$1"
> 	return 1
> }

Regards

Éric Masson




More information about the Lede-dev mailing list