- fixed statistics.c to use unsigned long long (instead of int) to handle

64 bit integers (Bug #579854, Debian #561161)
- fixed typo in statistics.c (Bug #579855)
This commit is contained in:
Jiří Popelka 2010-04-07 11:40:25 +00:00
parent 1f3e550147
commit 4af869109c
3 changed files with 49 additions and 2 deletions

View File

@ -0,0 +1,39 @@
diff -up net-tools-1.60/statistics.c.doubleword net-tools-1.60/statistics.c
--- net-tools-1.60/statistics.c.doubleword 2010-02-17 15:01:12.000000000 +0100
+++ net-tools-1.60/statistics.c 2010-04-07 13:18:02.000000000 +0200
@@ -271,7 +271,7 @@ int cmpentries(const void *a, const void
return strcmp(((struct entry *) a)->title, ((struct entry *) b)->title);
}
-void printval(struct tabtab *tab, char *title, int val)
+void printval(struct tabtab *tab, char *title, unsigned long long val)
{
struct entry *ent = NULL, key;
int type;
@@ -283,7 +283,7 @@ void printval(struct tabtab *tab, char *
sizeof(struct entry), cmpentries);
if (!ent) { /* try our best */
if (val)
- printf("%*s%s: %d\n", states[state].indent, "", title, val);
+ printf("%*s%s: %llu\n", states[state].indent, "", title, val);
return;
}
type = ent->type;
@@ -390,7 +390,7 @@ void process_fd(FILE *f,int file_desc)
*p = '\0';
if (*sp != '\0' && *(tab->flag))
- printval(tab, sp, strtoul(np, &np, 10));
+ printval(tab, sp, strtoull(np, &np, 10));
sp = p + 1;
}
@@ -426,7 +426,7 @@ void process_fd2(FILE *f, const char *fi
sp += strspn(sp, " \t\n");
if (*sp != '\0' && *(tab->flag))
- printval(tab, buf1, strtoul(sp, 0, 10));
+ printval(tab, buf1, strtoull(sp, 0, 10));
}
return;

View File

@ -47,7 +47,7 @@
+ { "TCPAbortOnMemory", N_("%u connections aborted due to memory pressure"), opt_number },
+ { "TCPAbortOnTimeout", N_("%u connections aborted due to timeout"), opt_number },
+ { "TCPAbortOnLinger", N_("%u connections aborted after user close in linger timeout"), opt_number },
+ { "TCPAbortFailed", N_("%u times unabled to send RST due to no memory"), opt_number },
+ { "TCPAbortFailed", N_("%u times unable to send RST due to no memory"), opt_number },
+ { "TCPMemoryPressures", N_("TCP ran low on memory %u times"), opt_number },
+ { "TCPLoss", N_("%u TCP data loss events") },
};

View File

@ -1,7 +1,7 @@
Summary: Basic networking tools
Name: net-tools
Version: 1.60
Release: 101%{?dist}
Release: 102%{?dist}
License: GPL+
Group: System Environment/Base
URL: http://net-tools.berlios.de/
@ -124,6 +124,9 @@ Patch84: net-tools-1.60-IA64.patch
# interface: fix IPv6 parsing of interfaces with large indexes (> 255) (Debian #433543)
Patch85: net-tools-1.60-large-indexes.patch
# netstat -s (statistics.c) now uses unsigned long long (instead of int) to handle 64 bit integers (Bug #579854, Debian #561161)
Patch86: net-tools-1.60-statistics-doubleword.patch
BuildRequires: gettext, libselinux
BuildRequires: libselinux-devel
Requires: hostname
@ -214,6 +217,7 @@ Most of them are obsolete. For replacement check iproute package.
%patch83 -p1 -b .mii-refactor
%patch84 -p1 -b .IA64
%patch85 -p1 -b .large-indexes
%patch86 -p1 -b .doubleword
cp %SOURCE1 ./config.h
cp %SOURCE2 ./config.make
@ -313,6 +317,10 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/ethers
%changelog
* Wed Apr 7 2010 Jiri Popelka <jpopelka@redhat.com> - 1.60-102
- fixed statistics.c to use unsigned long long (instead of int) to handle 64 bit integers (Bug #579854, Debian #561161)
- fixed typo in statistics.c (Bug #579855)
* Sat Jan 2 2010 Jiri Popelka <jpopelka@redhat.com> - 1.60-101
- fixed overflow patch (#551625)
- ifconfig interface:0 del <IP> will remove the Aliased IP on IA64 (#473211)