From e09dd130ef214103a34fccbeab44d5cdab4e55d9 Mon Sep 17 00:00:00 2001 From: Michal Ruprich Date: Fri, 23 Dec 2022 10:41:25 +0100 Subject: [PATCH] Resolves: #2077846 - net-tools utilities display incorrect statistics for interfaces with 15-character names --- net-tools-iface-name-too-long.patch | 15 +++++++++++++++ net-tools.spec | 7 ++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 net-tools-iface-name-too-long.patch diff --git a/net-tools-iface-name-too-long.patch b/net-tools-iface-name-too-long.patch new file mode 100644 index 0000000..e13a194 --- /dev/null +++ b/net-tools-iface-name-too-long.patch @@ -0,0 +1,15 @@ +diff --git a/lib/interface.c.old b/lib/interface.c +index 998830a..d35329f 100644 +--- a/lib/interface.c.old ++++ b/lib/interface.c +@@ -249,7 +249,10 @@ static const char *get_name(char **namep, const char *p) + *name++ = *p++; + count++; + if (count == (IFNAMSIZ-1)) ++ { ++ p++; + break; ++ } + } + *name++ = '\0'; + return p; diff --git a/net-tools.spec b/net-tools.spec index 8086a05..4603b67 100644 --- a/net-tools.spec +++ b/net-tools.spec @@ -3,7 +3,7 @@ Summary: Basic networking tools Name: net-tools Version: 2.0 -Release: 0.63.%{checkout}%{?dist} +Release: 0.64.%{checkout}%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/net-tools/ @@ -38,6 +38,7 @@ Patch23: net-tools-interface-name-len.patch Patch24: net-tools-correct-exit-code.patch Patch25: net-tools-spelling-error.patch Patch26: net-tools-route-inet6-output.patch +Patch27: net-tools-iface-name-too-long.patch BuildRequires: make BuildRequires: bluez-libs-devel @@ -74,6 +75,7 @@ cp %SOURCE8 ./man/en_US %patch24 -p1 -b .exit-codes %patch25 -p1 -b .spelling %patch26 -p1 -b .inet6-output +%patch27 -p1 -b .iface-name-too-long touch ./config.h @@ -146,6 +148,9 @@ install -D -p -m 644 %{SOURCE9} %{buildroot}%{_unitdir}/arp-ethers.service %attr(0644,root,root) %{_unitdir}/arp-ethers.service %changelog +* Fri Dec 23 2022 Michal Ruprich - 2.0-0.64.20160912git +- Resolves: #2077846 - net-tools utilities display incorrect statistics for interfaces with 15-character names + * Wed Aug 03 2022 Michal Ruprich - 2.0-0.63.20160912git - Resolves: #2114821 - The output of `route -A inet6` does not display properly when the 'Use' column output is over 6 digits