1 Star 0 Fork 43

zhongtao/src-iSulad

forked from src-openEuler/iSulad 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0095-bugfix-change-max-network-name-len.patch 2.45 KB
一键复制 编辑 原始数据 按行查看 历史
zhongtao 提交于 2024-06-11 19:55 . code improve and bugfix
From e2a7e6bfb0f0e97e5e1543fac7a5e0807fadaba0 Mon Sep 17 00:00:00 2001
From: liuxu <[email protected]>
Date: Thu, 30 May 2024 16:50:56 +0800
Subject: [PATCH 095/108] bugfix: change max network name len
Signed-off-by: liuxu <[email protected]>
---
docs/design/detailed/Network/native_network_adapter_design.md | 2 +-
.../design/detailed/Network/native_network_adapter_design_zh.md | 2 +-
src/utils/cutils/utils.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/design/detailed/Network/native_network_adapter_design.md b/docs/design/detailed/Network/native_network_adapter_design.md
index b58989eb..1010bd73 100644
--- a/docs/design/detailed/Network/native_network_adapter_design.md
+++ b/docs/design/detailed/Network/native_network_adapter_design.md
@@ -204,7 +204,7 @@ Client:
1. Parse the parameters passed in by the user.
2. Verify the incoming parameters, including:
- Only one network is allowed to be created at a time, that is, at most one name can be specified.
- - If name is specified, check whether the length of name exceeds MAX_NETWORK_NAME_LEN(128).
+ - If name is specified, check whether the length of name exceeds MAX_NETWORK_NAME_LEN(255).
3. Send the request to the server
Server:
diff --git a/docs/design/detailed/Network/native_network_adapter_design_zh.md b/docs/design/detailed/Network/native_network_adapter_design_zh.md
index 30860f3d..62c4b6ef 100644
--- a/docs/design/detailed/Network/native_network_adapter_design_zh.md
+++ b/docs/design/detailed/Network/native_network_adapter_design_zh.md
@@ -204,7 +204,7 @@ int native_network_add_container_list(const char *network_name, const char *cont
1. 解析用户传入的参数
2. 对传入的参数进行校验,包括
- 每次只允许创建一个网络, 即最多指定一个name
- - 若指定name,检查name长度是否超过MAX_NETWORK_NAME_LEN(128)
+ - 若指定name,检查name长度是否超过MAX_NETWORK_NAME_LEN(255)
3. 发送请求到服务端
服务端:
diff --git a/src/utils/cutils/utils.h b/src/utils/cutils/utils.h
index 3671272a..4417a165 100644
--- a/src/utils/cutils/utils.h
+++ b/src/utils/cutils/utils.h
@@ -99,7 +99,7 @@ int malloc_trim(size_t pad);
#define MAX_IMAGE_REF_LEN 384
#define MAX_CONTAINER_NAME_LEN 1024
#define MAX_RUNTIME_NAME_LEN 32
-#define MAX_NETWORK_NAME_LEN 128
+#define MAX_NETWORK_NAME_LEN 255
#define LOGIN_USERNAME_LEN 255
#define LOGIN_PASSWORD_LEN 255
--
2.25.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/taotao-sauce/src-iSulad.git
[email protected]:taotao-sauce/src-iSulad.git
taotao-sauce
src-iSulad
src-iSulad
master

搜索帮助