9abf8c
From 33f3c41793b8c22ae4c7158f7480b38d4eed3a73 Mon Sep 17 00:00:00 2001
9abf8c
From: Lukas Nykryn <lnykryn@redhat.com>
9abf8c
Date: Tue, 10 Mar 2020 15:18:37 +0100
9abf8c
Subject: [PATCH] network: fix glob matching ipv6 addresses
9abf8c
9abf8c
In this case we want to cover three cases
9abf8c
1) ip_address:ip_address
9abf8c
2) number:macaddress
9abf8c
3) :macaddress
9abf8c
9abf8c
We consider something an IPv6 address if it starts with number and
9abf8c
contains ":", but IPv6 addresses are in hexa.
9abf8c
9abf8c
(cherry picked from commit 7069132ec7e94a3274aa1b3b3b6e339066118a4d)
9abf8c
9abf8c
Resolves: #1812046
9abf8c
---
9abf8c
 modules.d/40network/net-lib.sh | 2 +-
9abf8c
 1 file changed, 1 insertion(+), 1 deletion(-)
9abf8c
9abf8c
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
9abf8c
index 6babcccf..fc914b30 100755
9abf8c
--- a/modules.d/40network/net-lib.sh
9abf8c
+++ b/modules.d/40network/net-lib.sh
9abf8c
@@ -508,7 +508,7 @@ ip_to_var() {
9abf8c
     [ -n "$6" ] && dev=$6
9abf8c
     [ -n "$7" ] && autoconf=$7
9abf8c
     case "$8" in
9abf8c
-        [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*)
9abf8c
+        [0-9a-fA-F]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*)
9abf8c
             dns1="$8"
9abf8c
             [ -n "$9" ] && dns2="$9"
9abf8c
             ;;
9abf8c