已开启
[sync] PR-228: adjust seq of ipvlan_mode enum #243
openeuler-ci-bot创建于 1月8日
[sync] PR-228: adjust seq of ipvlan_mode enum #243
已开启
openeuler-ci-bot创建于 1月8日
共 2 个文件变更+65-57
@@ -1,56 +1,58 @@
1-From 3ea7f5ac296ee5c19459c2bf00fecf98f552a1c5 Mon Sep 17 00:00:00 20011+From 55ef341ff815660b9c236fb75a8365b127fbb798 Mon Sep 17 00:00:00 2001
2-From: Feilong Lin <linfeilong@huawei.com>2+From: tangce <tangce1@huawei.com>
3-Date: Mon, 2 Mar 2020 20:52:06 +08003+Date: Tue, 9 Sep 2025 01:31:51 +0000
4- 4+Subject: [PATCH] feature-iproute-add-support-for-ipvlan-l2e-mode
5----5+ 
6- include/uapi/linux/if_link.h | 2 +-6+---
7- ip/iplink_ipvlan.c | 10 +++++-----7+ include/uapi/linux/if_link.h | 1 +
8- 2 files changed, 6 insertions(+), 6 deletions(-)8+ ip/iplink_ipvlan.c | 7 +++++--
9-diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h9+ 2 files changed, 6 insertions(+), 2 deletions(-)
10-index 1d4ed60..bddbdc7 10064410+ 
11---- a/include/uapi/linux/if_link.h11+diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
12-+++ b/include/uapi/linux/if_link.h12+index c2ca7a6..f98bdae 100644
13-@@ -702,6 +702,7 @@ enum {13+--- a/include/uapi/linux/if_link.h
14- enum ipvlan_mode {14++++ b/include/uapi/linux/if_link.h
15- IPVLAN_MODE_L2 = 0,15+@@ -740,6 +740,7 @@ enum ipvlan_mode {
16- IPVLAN_MODE_L3,16+ IPVLAN_MODE_L2 = 0,
17-+ IPVLAN_MODE_L2E,17+ IPVLAN_MODE_L3,
18- IPVLAN_MODE_L3S,18+ IPVLAN_MODE_L3S,
19- IPVLAN_MODE_MAX19++ IPVLAN_MODE_L2E,
20- };20+ IPVLAN_MODE_MAX
21-diff --git a/ip/iplink_ipvlan.c b/ip/iplink_ipvlan.c21+ };
22-index baae767..6de3138 10064422+
23---- a/ip/iplink_ipvlan.c23+diff --git a/ip/iplink_ipvlan.c b/ip/iplink_ipvlan.c
24-+++ b/ip/iplink_ipvlan.c24+index f29fa4f..743acd7 100644
25-@@ -23,7 +23,7 @@ static void print_explain(struct link_util *lu, FILE *f)25+--- a/ip/iplink_ipvlan.c
26- fprintf(f,26++++ b/ip/iplink_ipvlan.c
27- "Usage: ... %s [ mode MODE ] [ FLAGS ]\n"27+@@ -19,7 +19,7 @@ static void print_explain(struct link_util *lu, FILE *f)
28- "\n"28+ fprintf(f,
29-- "MODE: l3 | l3s | l2\n"29+ "Usage: ... %s [ mode MODE ] [ FLAGS ]\n"
30-+ "MODE: l3 | l2e | l3s | l2\n"30+ "\n"
31- "FLAGS: bridge | private | vepa\n"31+- "MODE: l3 | l3s | l2\n"
32- "(first values are the defaults if nothing is specified).\n",32++ "MODE: l3 | l2e | l3s | l2\n"
33- lu->id);33+ "FLAGS: bridge | private | vepa\n"
34-@@ -47,8 +47,10 @@ static int ipvlan_parse_opt(struct link_util *lu, int argc, char **argv,34+ "(first values are the defaults if nothing is specified).\n",
35- mode = IPVLAN_MODE_L3;35+ lu->id);
36- else if (strcmp(*argv, "l3s") == 0)36+@@ -43,8 +43,10 @@ static int ipvlan_parse_opt(struct link_util *lu, int argc, char **argv,
37- mode = IPVLAN_MODE_L3S;37+ mode = IPVLAN_MODE_L3;
38-+ else if (strcmp(*argv, "l2e") == 0)38+ else if (strcmp(*argv, "l3s") == 0)
39-+ mode = IPVLAN_MODE_L2E;39+ mode = IPVLAN_MODE_L3S;
40- else {40++ else if (strcmp(*argv, "l2e") == 0)
41-- fprintf(stderr, "Error: argument of \"mode\" must be either \"l2\", \"l3\" or \"l3s\"\n");41++ mode = IPVLAN_MODE_L2E;
42-+ fprintf(stderr, "Error: argument of \"mode\" must be either \"l2\", \"l3\", \"l2e\", or \"l3s\"\n");42+ else {
43- return -1;43+- fprintf(stderr, "Error: argument of \"mode\" must be either \"l2\", \"l3\" or \"l3s\"\n");
44- }44++ fprintf(stderr, "Error: argument of \"mode\" must be either \"l2\", \"l3\", \"l2e\", or \"l3s\"\n");
45- addattr16(n, 1024, IFLA_IPVLAN_MODE, mode);45+ return -1;
46-@@ -88,6 +90,7 @@ static void ipvlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])46+ }
47- __u16 mode = rta_getattr_u16(tb[IFLA_IPVLAN_MODE]);47+ addattr16(n, 1024, IFLA_IPVLAN_MODE, mode);
48- const char *mode_str = mode == IPVLAN_MODE_L2 ? "l2" :48+@@ -84,6 +86,7 @@ static void ipvlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
49- mode == IPVLAN_MODE_L3 ? "l3" :49+ __u16 mode = rta_getattr_u16(tb[IFLA_IPVLAN_MODE]);
50-+ mode == IPVLAN_MODE_L2E ? "l2e" :50+ const char *mode_str = mode == IPVLAN_MODE_L2 ? "l2" :
51- mode == IPVLAN_MODE_L3S ? "l3s" : "unknown";51+ mode == IPVLAN_MODE_L3 ? "l3" :
52- 52++ mode == IPVLAN_MODE_L2E ? "l2e" :
53- print_string(PRINT_ANY, "mode", " mode %s ", mode_str);53+ mode == IPVLAN_MODE_L3S ? "l3s" : "unknown";
54--- 54+
55-2.19.155+ print_string(PRINT_ANY, "mode", " mode %s ", mode_str);
56- 56+--
57+2.33.0
58+ 
@@ -2,7 +2,7 @@
2Name: iproute2Name: iproute
3Version: 6.6.03Version: 6.6.0
4Epoch: 14Epoch: 1
5-Release: 65+Release: 7
6Summary: Linux network configuration utilities6Summary: Linux network configuration utilities
7License: GPLv2+ and Public Domain7License: GPLv2+ and Public Domain
8URL: https://kernel.org/pub/linux/utils/net/iproute2/8URL: https://kernel.org/pub/linux/utils/net/iproute2/
@@ -99,6 +99,12 @@ install -m 0644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a
99%{_mandir}/*99%{_mandir}/*
100 100 
101%changelog101%changelog
102+* Tue Sep 09 2025 tangce <tangce1@h-partners.com> - 1:6.6.0-7
103+- Type:bugfix
104+- ID:NA
105+- SUG:NA
106+- DESC:adjust seq of ipvlan_mode enum
107+ 
102* Tue Jul 15 2025 gaihuiying <eaglegai@163.com> - 1:6.6.0-6108* Tue Jul 15 2025 gaihuiying <eaglegai@163.com> - 1:6.6.0-6
103- Type:bugfix109- Type:bugfix
104- ID:NA110- ID:NA