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