diff --git a/fix-ifconfig-display-error-when-the-length-of-interface-name-is-15.patch b/fix-ifconfig-display-error-when-the-length-of-interface-name-is-15.patch new file mode 100644 index 0000000000000000000000000000000000000000..59c3d433c7fd060cb6b6bc43710d726daf1ab201 --- /dev/null +++ b/fix-ifconfig-display-error-when-the-length-of-interface-name-is-15.patch @@ -0,0 +1,28 @@ +From bf7cc74cd048bfd9d1fb9474e94a915cc9e86fdb Mon Sep 17 00:00:00 2001 +From: eaglegai +Date: Fri, 2 Dec 2022 09:47:06 +0800 +Subject: [PATCH] fix ifconfig display error when the length of interface name is 15 + +Signed-off-by: eaglegai +--- + lib/interface.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/lib/interface.c b/lib/interface.c +index baa9a9a..f321340 100644 +--- a/lib/interface.c ++++ b/lib/interface.c +@@ -248,8 +248,10 @@ static const char *get_name(char **namep, const char *p) + } + *name++ = *p++; + count++; +- if (count == (IFNAMSIZ-1)) ++ if (count == (IFNAMSIZ-1)) { ++ p++; + break; ++ } + } + *name++ = '\0'; + return p; +-- +2.33.0 diff --git a/net-tools.spec b/net-tools.spec index 82db1fbbee1e815d7bed33bc9d28c1cdbcd5bc3d..a83e9e91a6948a5f623293c0dc38a887aec0361b 100644 --- a/net-tools.spec +++ b/net-tools.spec @@ -1,6 +1,6 @@ Name: net-tools Version: 2.0 -Release: 0.54 +Release: 0.55 Summary: Important Programs for Networking License: GPLv2+ URL: https://sourceforge.net/projects/net-tools/ @@ -22,6 +22,7 @@ Patch20: ether-wake-interfaces.patch Patch21: net-tools-ifconfig-EiB.patch Patch22: net-tools-timer-man.patch Patch23: net-tools-interface-name-len.patch +Patch24: fix-ifconfig-display-error-when-the-length-of-interface-name-is-15.patch BuildRequires: bluez-libs-devel gettext, libselinux libselinux-devel systemd gcc %{?systemd_requires} @@ -51,6 +52,8 @@ cp %SOURCE8 ./man/en_US %patch21 -p1 -b .ifconfig-EiB %patch22 -p1 -b .timer-man %patch23 -p1 -b .interface-name-len +%patch24 -p1 + touch ./config.h %build @@ -111,6 +114,12 @@ touch %{buildroot}%{_unitdir}/arp-ethers.service %exclude %{_mandir}/pt/man5 %changelog +* Mon Dec 19 2022 eaglegai - 2.0-0.55 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix ifconfig display error when the length of interface name is 15 + * Tue Dec 31 2019 openEuler Buildteam - 2.0-0.54 - Type:bugfix - ID:NA