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 1543571bf62eee31d29a2ac3a526b9d6447dc888..789212af908a2d4a72ca629f3e6853823dabb854 100644 --- a/net-tools.spec +++ b/net-tools.spec @@ -1,6 +1,6 @@ Name: net-tools Version: 2.10 -Release: 2 +Release: 3 Summary: Important Programs for Networking License: GPLv2+ URL: https://sourceforge.net/projects/net-tools/ @@ -19,6 +19,7 @@ Patch1: backport-net-tools-cycle.patch Patch2: backport-net-tools-man.patch Patch3: backport-ether-wake-interfaces.patch Patch4: backport-interface-change-pointopoint-short-flag-from-P-to-p.patch +Patch5: 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} @@ -45,6 +46,7 @@ cp %SOURCE8 ./man/en_US %patch2 -p1 -b .man %patch3 -p1 -b .interfaces %patch4 -p1 +%patch5 -p1 touch ./config.h %build @@ -105,6 +107,12 @@ touch %{buildroot}%{_unitdir}/arp-ethers.service %exclude %{_mandir}/pt/man5 %changelog +* Mon Dec 19 2022 eaglegai - 2.10-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix ifconfig display error when the length of interface name is 15 + * Thu Oct 20 2022 konglidong - 2.10-2 - Type:bugfix - ID:NA