Changeset 42140


Ignore:
Timestamp:
2014-08-11T20:17:09+02:00 (3 years ago)
Author:
jow
Message:

BB: base-files: /lib/functions/network.sh: fix network_get_ipaddr6

When looking for the first ipaddr also consider the current prefix just
like network_get_ipaddrs6 does. If ipv6-address was empty the function
did not return the first ipaddr even if the list was non-empty.

fixes commit 83e9122f88a002871d5cdf421cf6aa6052b7e006

Signed-off-by: Henning Schild <henning@…>

Backport of r42139

Location:
branches/barrier_breaker/package/base-files
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/barrier_breaker/package/base-files/Makefile

    r41967 r42140  
    1212 
    1313PKG_NAME:=base-files 
    14 PKG_RELEASE:=155 
     14PKG_RELEASE:=156 
    1515 
    1616PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ 
  • branches/barrier_breaker/package/base-files/files/lib/functions/network.sh

    r41281 r42140  
    3030# 2: interface 
    3131network_get_ipaddr6() { 
    32         __network_ifstatus "$1" "$2" "['ipv6-address'][0].address"; 
     32        local __addr 
     33 
     34        if __network_ifstatus "__addr" "$2" "['ipv6-address','ipv6-prefix-assignment'][0].address"; then 
     35                case "$__addr" in 
     36                        *:)     export "$1=${__addr}1" ;; 
     37                        *)      export "$1=${__addr}" ;; 
     38                esac 
     39                return 0 
     40        fi 
     41 
     42        unset $1 
     43        return 1 
    3344} 
    3445 
Note: See TracChangeset for help on using the changeset viewer.