diff options
author | Brian Bennett <brian.bennett@joyent.com> | 2022-01-14 13:25:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-14 13:25:50 -0800 |
commit | b8d49375cbab0970a3b107033295c5b9bb878033 (patch) | |
tree | 5d245957bcd0a78f859a19d3e65e1e19a33e8f61 | |
parent | a3282be5a82864d56582e45a509bf9124a97ae45 (diff) | |
download | illumos-joyent-b8d49375cbab0970a3b107033295c5b9bb878033.tar.gz |
OS-8346 mdata:fetch clobbers IPv6 addresses if they have caps (#387)
Reviewed by: Dan McDonald <danmcd@kebe.com>
Approved by: Dan McDonald <danmcd@kebe.com>
-rwxr-xr-x | usr/src/cmd/svc/milestone/mdata-fetch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/cmd/svc/milestone/mdata-fetch b/usr/src/cmd/svc/milestone/mdata-fetch index cb7222f445..10574ca7e0 100755 --- a/usr/src/cmd/svc/milestone/mdata-fetch +++ b/usr/src/cmd/svc/milestone/mdata-fetch @@ -21,7 +21,7 @@ # # CDDL HEADER END # -# Copyright (c) 2017, Joyent, Inc. All rights reserved. +# Copyright 2022 Joyent, Inc. # export PS4='[\D{%FT%TZ}] ${BASH_SOURCE}:${LINENO}: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' @@ -56,12 +56,12 @@ function isIPv4AndCIDR() { # Test if an address looks like an IPv6 address. function isIPv6() { - [[ "$1" =~ ^[0-9a-f]*:[0-9a-f]*:[:0-9a-f]*$ ]] + [[ "${1,,}" =~ ^[0-9a-f]*:[0-9a-f]*:[:0-9a-f]*$ ]] } # Test if an address looks like an IPv6 address + CIDR. function isIPv6AndCIDR() { - [[ "$1" =~ ^[0-9a-f]*:[0-9a-f]*:[:0-9a-f]*/[0-9]{1,3}$ ]] + [[ "${1,,}" =~ ^[0-9a-f]*:[0-9a-f]*:[:0-9a-f]*/[0-9]{1,3}$ ]] } # For old zones that were created prior to OS-2253 and bumping the mdata:fetch |