1 Star 0 Fork 32

anakinzhang/dracut

forked from src-openEuler/dracut 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
dracut-network-fix-glob-matching-ipv6-addresses.patch 999 Bytes
一键复制 编辑 原始数据 按行查看 历史
Liquor 提交于 2020-07-23 18:51 . update to 050
From 7069132ec7e94a3274aa1b3b3b6e339066118a4d Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <[email protected]>
Date: Tue, 10 Mar 2020 15:18:37 +0100
Subject: [PATCH] network: fix glob matching ipv6 addresses
In this case we want to cover three cases
1) ip_address:ip_address
2) number:macaddress
3) :macaddress
We consider something an IPv6 address if it starts with number and
contains ":", but IPv6 addresses are in hexa.
---
modules.d/40network/net-lib.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
index 16730e5..7f185fd 100755
--- a/modules.d/40network/net-lib.sh
+++ b/modules.d/40network/net-lib.sh
@@ -510,7 +510,7 @@ ip_to_var() {
[ -n "$6" ] && dev=$6
[ -n "$7" ] && autoconf=$7
case "$8" in
- [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*)
+ [0-9a-fA-F]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*)
dns1="$8"
[ -n "$9" ] && dns2="$9"
;;
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/anakintxzhang/dracut.git
[email protected]:anakintxzhang/dracut.git
anakintxzhang
dracut
dracut
master

搜索帮助