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