diff options
Diffstat (limited to 'package/base-files')
-rw-r--r-- | package/base-files/Makefile | 2 | ||||
-rw-r--r-- | package/base-files/files/lib/functions/network.sh | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 10724b3..8338514 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=base-files -PKG_RELEASE:=155 +PKG_RELEASE:=156 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ PKG_BUILD_DEPENDS:=opkg/host diff --git a/package/base-files/files/lib/functions/network.sh b/package/base-files/files/lib/functions/network.sh index 86ab890..f4cf2b5 100644 --- a/package/base-files/files/lib/functions/network.sh +++ b/package/base-files/files/lib/functions/network.sh @@ -29,7 +29,18 @@ network_get_ipaddr() { # 1: destination variable # 2: interface network_get_ipaddr6() { - __network_ifstatus "$1" "$2" "['ipv6-address'][0].address"; + local __addr + + if __network_ifstatus "__addr" "$2" "['ipv6-address','ipv6-prefix-assignment'][0].address"; then + case "$__addr" in + *:) export "$1=${__addr}1" ;; + *) export "$1=${__addr}" ;; + esac + return 0 + fi + + unset $1 + return 1 } # determine first IPv4 subnet of given logical interface |