summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Bennett <brian.bennett@joyent.com>2022-01-14 13:25:50 -0800
committerGitHub <noreply@github.com>2022-01-14 13:25:50 -0800
commitb8d49375cbab0970a3b107033295c5b9bb878033 (patch)
tree5d245957bcd0a78f859a19d3e65e1e19a33e8f61
parenta3282be5a82864d56582e45a509bf9124a97ae45 (diff)
downloadillumos-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-xusr/src/cmd/svc/milestone/mdata-fetch6
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