1
0
mirror of https://git.openwrt.org/feed/routing.git synced 2024-06-16 12:14:10 +02:00

Merge pull request #354 from adrianschmutzler/fe80master

alfred: Support interface IDs with more than two digits
This commit is contained in:
Moritz Warning 2018-05-02 16:49:32 +02:00 committed by GitHub
commit 069da036cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,11 +46,11 @@ wait_for_ll_address()
for i in $(seq $timeout); do
# We look for
# - the link-local address (starts with fe80)
# - without tentative flag (bit 0x40 in the flags field; the first char of the flags field begins 38 columns after the fe80 prefix
# - without tentative flag (bit 0x40 in the flags field; the first char of the fifth field is evaluated)
# - on interface $iface
if awk '
BEGIN { RET=1 }
/^fe80.{37} [012389ab]/ { if ($6 == "'"$iface"'") RET=0 }
$1 ~ /^fe80/ && $5 ~ /^[012389ab]/ && $6 == "'"$iface"'" { RET=0 }
END { exit RET }
' /proc/net/if_inet6; then
return