1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
From e2a7e6bfb0f0e97e5e1543fac7a5e0807fadaba0 Mon Sep 17 00:00:00 2001
From: liuxu <liuxu156@huawei.com>
Date: Thu, 30 May 2024 16:50:56 +0800
Subject: [PATCH 095/108] bugfix: change max network name len
Signed-off-by: liuxu <liuxu156@huawei.com>
---
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
|