From 3f720650b5b26604728b839cf81872e6d6f57ad6 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Thu, 5 Jan 2012 13:41:31 +0100 Subject: [PATCH] removed 14 patches 11 patches merged upstream removed bcast.patch (seems to be fixed upstream) removed netstat-p-basename.patch (upstream is not happy with it) netstat-leak.patch merged into duplicate-tcp.patch --- .gitignore | 1 + ipmaddr.8 | 8 +- iptunnel.8 | 3 +- net-tools-1.60-IA64.patch | 13 - net-tools-1.60-arp_overflow.patch | 11 - net-tools-1.60-bcast.patch | 86 ---- net-tools-1.60-clear-flag.patch | 39 -- net-tools-1.60-config.h | 1 + net-tools-1.60-config.make | 1 + net-tools-1.60-coverity.patch | 245 ----------- net-tools-1.60-cycle.patch | 46 +- net-tools-1.60-duplicate-tcp.patch | 11 +- net-tools-1.60-interface_stack.patch | 42 +- net-tools-1.60-ipx.patch | 5 - net-tools-1.60-isofix.patch | 33 -- net-tools-1.60-mii-registers.patch | 8 +- net-tools-1.60-nameif-return.patch | 28 -- net-tools-1.60-nameif_strncpy.patch | 14 - net-tools-1.60-netstat-leak.patch | 11 - net-tools-1.60-netstat-p-basename.patch | 21 - net-tools-1.60-plipconfig.patch | 55 --- net-tools-1.60-scanf-format.patch | 69 --- net-tools-1.60-selinux.patch | 54 +-- net-tools-1.60-statistics-doubleword.patch | 468 --------------------- net-tools-1.60-x25-proc.patch | 14 - net-tools.spec | 157 +++---- sources | 2 +- 27 files changed, 153 insertions(+), 1293 deletions(-) delete mode 100644 net-tools-1.60-IA64.patch delete mode 100644 net-tools-1.60-arp_overflow.patch delete mode 100644 net-tools-1.60-bcast.patch delete mode 100644 net-tools-1.60-clear-flag.patch delete mode 100644 net-tools-1.60-coverity.patch delete mode 100644 net-tools-1.60-isofix.patch delete mode 100644 net-tools-1.60-nameif-return.patch delete mode 100644 net-tools-1.60-nameif_strncpy.patch delete mode 100644 net-tools-1.60-netstat-leak.patch delete mode 100644 net-tools-1.60-netstat-p-basename.patch delete mode 100644 net-tools-1.60-plipconfig.patch delete mode 100644 net-tools-1.60-scanf-format.patch delete mode 100644 net-tools-1.60-statistics-doubleword.patch delete mode 100644 net-tools-1.60-x25-proc.patch diff --git a/.gitignore b/.gitignore index b270b03..1de503c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ net-tools-1.60.tar.bz2 /net-tools-1.60.20111206git.tar.gz /net-tools-1.60.20111207git.tar.xz +/net-tools-1.60.20120105git.tar.xz diff --git a/ipmaddr.8 b/ipmaddr.8 index d2b0046..52dd49c 100644 --- a/ipmaddr.8 +++ b/ipmaddr.8 @@ -1,5 +1,5 @@ .\" Process this file with -.\" groff -man -Tascii iptstate.8 +.\" groff -man -Tascii ipmaddr.8 .\" .TH IPMADDR 8 "SEPTEMBER 2009" "" "" .\" @@ -16,7 +16,7 @@ .SH NOTE .P -This program is obsolete. For replacement check \fBip maddress\fR. +This program is obsolete. For replacement check \fBip maddr\fR. .SH DESCRIPTION The \fBipmaddr\fR command can perform one of the following operations: @@ -25,10 +25,10 @@ The \fBipmaddr\fR command can perform one of the following operations: \- add a multicast address .B del -- delete a multicast address +\- delete a multicast address .B show -- list multicast addresses +\- list multicast addresses .SH SEE ALSO .BR ip (8). diff --git a/iptunnel.8 b/iptunnel.8 index 2dacd40..3f5da84 100644 --- a/iptunnel.8 +++ b/iptunnel.8 @@ -1,12 +1,11 @@ .\" Process this file with -.\" groff -man -Tascii iptstate.8 +.\" groff -man -Tascii iptunnel.8 .\" .TH IPTUNNEL 8 "SEPTEMBER 2009" "" "" .\" .\" Man page written by Jiri Popelka .\" .SH NAME - .B iptunnel \- creates, deletes, and displays configured tunnels diff --git a/net-tools-1.60-IA64.patch b/net-tools-1.60-IA64.patch deleted file mode 100644 index 80e5f95..0000000 --- a/net-tools-1.60-IA64.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up net-tools-1.60/ifconfig.c.IA64 net-tools-1.60/ifconfig.c ---- net-tools-1.60/ifconfig.c.IA64 2011-12-06 14:36:57.158662389 +0100 -+++ net-tools-1.60/ifconfig.c 2011-12-06 14:36:57.247661276 +0100 -@@ -914,7 +914,8 @@ int main(int argc, char **argv) - continue; - } - -- memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long)); -+ memset(&ip, 0, sizeof(unsigned long)); -+ memcpy(&ip, &sin.sin_addr.s_addr, sizeof(sin.sin_addr.s_addr)); - - if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) { - fprintf(stderr, _("Interface %s not initialized\n"), diff --git a/net-tools-1.60-arp_overflow.patch b/net-tools-1.60-arp_overflow.patch deleted file mode 100644 index 4679a51..0000000 --- a/net-tools-1.60-arp_overflow.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- net-tools-1.60/arp.c.old 2005-08-03 08:23:46.000000000 +0200 -+++ net-tools-1.60/arp.c 2005-08-03 11:02:10.000000000 +0200 -@@ -235,7 +235,7 @@ - struct ifreq ifr; - struct hwtype *xhw; - -- strcpy(ifr.ifr_name, ifname); -+ strncpy(ifr.ifr_name, ifname, IFNAMSIZ); - if (ioctl(sockfd, SIOCGIFHWADDR, &ifr) < 0) { - fprintf(stderr, _("arp: cant get HW-Address for `%s': %s.\n"), ifname, strerror(errno)); - return (-1); diff --git a/net-tools-1.60-bcast.patch b/net-tools-1.60-bcast.patch deleted file mode 100644 index 92afdf6..0000000 --- a/net-tools-1.60-bcast.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff -up net-tools-1.60/ifconfig.c.bcast net-tools-1.60/ifconfig.c ---- net-tools-1.60/ifconfig.c.bcast 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/ifconfig.c 2011-12-02 16:16:06.793742329 +0100 -@@ -35,6 +35,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -239,9 +240,12 @@ static void version(void) - exit(E_USAGE); - } - --static int set_netmask(int skfd, struct ifreq *ifr, struct sockaddr *sa) -+static int set_netmask(int skfd, struct ifreq *ifr, struct sockaddr *sa, int new_bcast) - { - int err = 0; -+ struct sockaddr_in * ip_addr, * netmask, *bcast; -+ struct ifreq ifraddr; -+ struct ifreq ifrbcast; - - memcpy((char *) &ifr->ifr_netmask, (char *) sa, - sizeof(struct sockaddr)); -@@ -250,6 +254,25 @@ static int set_netmask(int skfd, struct - strerror(errno)); - err = 1; - } -+ -+ if (new_bcast) { -+ memcpy(&ifraddr,ifr,sizeof(struct ifreq)); -+ memcpy(&ifrbcast,ifr,sizeof(struct ifreq)); -+ if (ioctl(skfd, SIOCGIFADDR, &ifraddr) < 0) { -+ fprintf(stderr, "SIOCGIFADDR: %s\n", strerror(errno)); -+ err = 1; -+ } -+ ip_addr = (struct sockaddr_in *)&ifraddr.ifr_addr; -+ netmask = (struct sockaddr_in *)&ifr->ifr_netmask; -+ bcast = (struct sockaddr_in *)&ifrbcast.ifr_broadaddr; -+ /* calculate new broadcast adress */ -+ bcast->sin_addr.s_addr = ip_addr->sin_addr.s_addr | ~netmask->sin_addr.s_addr; -+ /* set new broadcast adress */ -+ if (ioctl(skfd, SIOCSIFBRDADDR, &ifrbcast) < 0) { -+ fprintf(stderr, "SIOCSIFBROADCAST: %s\n", strerror(errno)); -+ err = 1; -+ } -+ } - return err; - } - -@@ -262,7 +285,7 @@ int main(int argc, char **argv) - struct aftype *ap; - struct hwtype *hw; - struct ifreq ifr; -- int goterr = 0, didnetmask = 0, neednetmask=0; -+ int goterr = 0, didnetmask = 0, neednetmask=0, dobcast = 1; - char **spp; - int fd; - #if HAVE_AFINET6 -@@ -547,6 +570,7 @@ int main(int argc, char **argv) - strerror(errno)); - goterr = 1; - } -+ dobcast = 0; - spp++; - } - goterr |= set_flag(ifr.ifr_name, IFF_BROADCAST); -@@ -589,7 +613,7 @@ int main(int argc, char **argv) - continue; - } - didnetmask++; -- goterr |= set_netmask(ap->fd, &ifr, &sa); -+ goterr |= set_netmask(ap->fd, &ifr, &sa, dobcast); - spp++; - continue; - } -@@ -1045,7 +1069,7 @@ int main(int argc, char **argv) - } - - if (neednetmask) { -- goterr |= set_netmask(skfd, &ifr, &samask); -+ goterr |= set_netmask(skfd, &ifr, &samask, dobcast); - didnetmask++; - } - diff --git a/net-tools-1.60-clear-flag.patch b/net-tools-1.60-clear-flag.patch deleted file mode 100644 index b510ac3..0000000 --- a/net-tools-1.60-clear-flag.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up net-tools-1.60/ifconfig.c.clear-flag net-tools-1.60/ifconfig.c ---- net-tools-1.60/ifconfig.c.clear-flag 2011-12-06 12:58:18.000000000 +0100 -+++ net-tools-1.60/ifconfig.c 2011-12-06 13:02:37.881413090 +0100 -@@ -464,7 +464,7 @@ int main(int argc, char **argv) - } - if (!strcmp(*spp, "-allmulti")) { - goterr |= clr_flag(ifr.ifr_name, IFF_ALLMULTI); -- if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0) -+ if (test_flag(ifr.ifr_name, IFF_ALLMULTI) > 0) - fprintf(stderr, _("Warning: Interface %s still in ALLMULTI mode.\n"), ifr.ifr_name); - spp++; - continue; -@@ -488,7 +488,7 @@ int main(int argc, char **argv) - if (!strcmp(*spp, "-dynamic")) { - goterr |= clr_flag(ifr.ifr_name, IFF_DYNAMIC); - spp++; -- if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0) -+ if (test_flag(ifr.ifr_name, IFF_DYNAMIC) > 0) - fprintf(stderr, _("Warning: Interface %s still in DYNAMIC mode.\n"), ifr.ifr_name); - continue; - } -@@ -546,7 +546,7 @@ int main(int argc, char **argv) - - if (!strcmp(*spp, "-broadcast")) { - goterr |= clr_flag(ifr.ifr_name, IFF_BROADCAST); -- if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0) -+ if (test_flag(ifr.ifr_name, IFF_BROADCAST) > 0) - fprintf(stderr, _("Warning: Interface %s still in BROADCAST mode.\n"), ifr.ifr_name); - spp++; - continue; -@@ -685,7 +685,7 @@ int main(int argc, char **argv) - if (!strcmp(*spp, "-pointopoint")) { - goterr |= clr_flag(ifr.ifr_name, IFF_POINTOPOINT); - spp++; -- if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0) -+ if (test_flag(ifr.ifr_name, IFF_POINTOPOINT) > 0) - fprintf(stderr, _("Warning: Interface %s still in POINTOPOINT mode.\n"), ifr.ifr_name); - continue; - } diff --git a/net-tools-1.60-config.h b/net-tools-1.60-config.h index 92ca6ba..a7a847c 100644 --- a/net-tools-1.60-config.h +++ b/net-tools-1.60-config.h @@ -38,6 +38,7 @@ #define HAVE_AFECONET 1 #define HAVE_AFDECnet 0 #define HAVE_AFASH 1 +#define HAVE_AFBLUETOOTH 0 /* * diff --git a/net-tools-1.60-config.make b/net-tools-1.60-config.make index c947b7c..255797c 100644 --- a/net-tools-1.60-config.make +++ b/net-tools-1.60-config.make @@ -11,6 +11,7 @@ HAVE_AFX25=1 HAVE_AFECONET=1 # HAVE_AFDECnet=0 HAVE_AFASH=1 +# HAVE_AFBLUETOOTH=0 HAVE_HWETHER=1 HAVE_HWARC=1 HAVE_HWSLIP=1 diff --git a/net-tools-1.60-coverity.patch b/net-tools-1.60-coverity.patch deleted file mode 100644 index e21bb75..0000000 --- a/net-tools-1.60-coverity.patch +++ /dev/null @@ -1,245 +0,0 @@ -diff -up net-tools-1.60/ipmaddr.c.coverity net-tools-1.60/ipmaddr.c ---- net-tools-1.60/ipmaddr.c.coverity 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/ipmaddr.c 2011-12-06 15:16:27.210032670 +0100 -@@ -160,6 +160,11 @@ void read_dev_mcast(struct ma_info **res - len = parse_hex(hexa, (unsigned char*)&m.addr.data); - if (len >= 0) { - struct ma_info *ma = malloc(sizeof(m)); -+ if (!ma) { -+ fprintf(stderr, "couldn't allocate memory\n"); -+ fclose(fp); -+ return; -+ } - - memcpy(ma, &m, sizeof(m)); - ma->addr.bytelen = len; -@@ -174,7 +179,7 @@ void read_dev_mcast(struct ma_info **res - - void read_igmp(struct ma_info **result_p) - { -- struct ma_info m; -+ struct ma_info m, *ma = NULL; - char buf[256]; - FILE *fp = fopen(_PATH_PROCNET_IGMP, "r"); - -@@ -188,8 +193,6 @@ void read_igmp(struct ma_info **result_p - m.addr.bytelen = 4; - - while (fgets(buf, sizeof(buf), fp)) { -- struct ma_info *ma = malloc(sizeof(m)); -- - if (buf[0] != '\t') { - sscanf(buf, "%d%s", &m.index, m.name); - continue; -@@ -201,6 +204,12 @@ void read_igmp(struct ma_info **result_p - sscanf(buf, "%08x%d", (__u32*)&m.addr.data, &m.users); - - ma = malloc(sizeof(m)); -+ if (!ma) { -+ fprintf(stderr, "couldn't allocate memory\n"); -+ fclose(fp); -+ return; -+ } -+ - memcpy(ma, &m, sizeof(m)); - maddr_ins(result_p, ma); - } -@@ -232,6 +241,11 @@ void read_igmp6(struct ma_info **result_ - len = parse_hex(hexa, (unsigned char*)&m.addr.data); - if (len >= 0) { - struct ma_info *ma = malloc(sizeof(m)); -+ if (!ma) { -+ fprintf(stderr, "couldn't allocate memory\n"); -+ fclose(fp); -+ return; -+ } - - memcpy(ma, &m, sizeof(m)); - -diff -up net-tools-1.60/iptunnel.c.coverity net-tools-1.60/iptunnel.c ---- net-tools-1.60/iptunnel.c.coverity 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/iptunnel.c 2011-12-06 15:17:25.231307304 +0100 -@@ -485,6 +485,7 @@ static int do_tunnels_list(struct ip_tun - if ((ptr = strchr(buf, ':')) == NULL || - (*ptr++ = 0, sscanf(buf, "%s", name) != 1)) { - fprintf(stderr, _("Wrong format of /proc/net/dev. Sorry.\n")); -+ fclose(fp); - return -1; - } - if (sscanf(ptr, "%ld%ld%ld%ld%ld%ld%ld%*d%ld%ld%ld%ld%ld%ld%ld", -@@ -521,6 +522,7 @@ static int do_tunnels_list(struct ip_tun - tx_packets, tx_bytes, tx_errs, tx_colls, tx_carrier, tx_drops); - } - } -+ fclose(fp); - return 0; - } - -diff -up net-tools-1.60/lib/inet.c.coverity net-tools-1.60/lib/inet.c ---- net-tools-1.60/lib/inet.c.coverity 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/lib/inet.c 2011-12-06 15:20:21.183107604 +0100 -@@ -211,10 +211,18 @@ static int INET_rresolve(char *name, siz - if ((ent == NULL) && (np == NULL)) - safe_strncpy(name, inet_ntoa(sin->sin_addr), len); - pn = (struct addr *) malloc(sizeof(struct addr)); -+ if (!pn) { -+ fprintf (stderr, "rresolve: couldn't allocate memory\n"); -+ return (0); -+ } - pn->addr = *sin; - pn->next = INET_nn; - pn->host = host; - pn->name = (char *) malloc(strlen(name) + 1); -+ if (!pn->name) { -+ fprintf (stderr, "rresolve: couldn't allocate memory\n"); -+ return (0); -+ } - strcpy(pn->name, name); - INET_nn = pn; - -@@ -386,8 +394,11 @@ static int read_services(void) - while ((se = getservent())) { - /* Allocate a service entry. */ - item = (struct service *) malloc(sizeof(struct service)); -- if (item == NULL) -- perror("netstat"); -+ if (item == NULL) { -+ perror("netstat: couldn't allocate memory"); -+ endservent(); -+ return (0); -+ } - item->name = strdup(se->s_name); - item->number = se->s_port; - -@@ -405,8 +416,11 @@ static int read_services(void) - while ((pe = getprotoent())) { - /* Allocate a service entry. */ - item = (struct service *) malloc(sizeof(struct service)); -- if (item == NULL) -- perror("netstat"); -+ if (item == NULL) { -+ perror("netstat: couldn't allocate memory"); -+ endprotoent(); -+ return (0); -+ } - item->name = strdup(pe->p_name); - item->number = htons(pe->p_proto); - add2list(&raw_name, item); -diff -up net-tools-1.60/lib/masq_info.c.coverity net-tools-1.60/lib/masq_info.c ---- net-tools-1.60/lib/masq_info.c.coverity 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/lib/masq_info.c 2011-12-06 15:22:21.768600077 +0100 -@@ -208,10 +208,9 @@ int ip_masq_info(int numeric_host, int n - } - for (i = 0; i < ntotal; i++) - print_masq(&(mslist[i]), numeric_host, numeric_port, ext); -- if (mslist) -- free(mslist); -- - } -+ if (mslist) -+ free(mslist); - return 0; - } - #endif -diff -up net-tools-1.60/lib/netrom_gr.c.coverity net-tools-1.60/lib/netrom_gr.c ---- net-tools-1.60/lib/netrom_gr.c.coverity 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/lib/netrom_gr.c 2011-12-06 15:23:34.471691164 +0100 -@@ -39,9 +39,7 @@ int NETROM_rprint(int options) - /*int ext = options & FLAG_EXT; - int numeric = options & FLAG_NUM_HOST; */ - -- f1 = fopen(_PATH_PROCNET_NR_NODES, "r"); - if (!f1) perror(_PATH_PROCNET_NR_NODES); -- f2 = fopen(_PATH_PROCNET_NR_NEIGH, "r"); - if (!f2) perror(_PATH_PROCNET_NR_NEIGH); - - if (f1 == NULL || f2 == NULL) { -diff -up net-tools-1.60/lib/x25.c.coverity net-tools-1.60/lib/x25.c ---- net-tools-1.60/lib/x25.c.coverity 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/lib/x25.c 2011-12-06 15:24:37.189907079 +0100 -@@ -105,7 +105,8 @@ X25_input(int type, char *bufp, struct s - } - - if (strlen(bufp) < 1 || strlen(bufp) > 15 || sigdigits > strlen(bufp)) { -- *p = '/'; -+ if (p != NULL) -+ *p = '/'; - strcpy(X25_errmsg, _("Invalid address")); - #ifdef DEBUG - fprintf(stderr, "x25_input(%s): %s !\n", X25_errmsg, orig); -diff -up net-tools-1.60/nameif.c.coverity net-tools-1.60/nameif.c ---- net-tools-1.60/nameif.c.coverity 2011-12-06 15:12:17.000000000 +0100 -+++ net-tools-1.60/nameif.c 2011-12-06 15:28:06.417291375 +0100 -@@ -154,6 +154,7 @@ void readconf(void) - FILE *ifh; - char *p; - int n; -+ struct change *ch = NULL; - - ifh = fopen(fname, "r"); - if (!ifh) -@@ -163,7 +164,6 @@ void readconf(void) - linel = 0; - linenum = 1; - while (getdelim(&line, &linel, '\n', ifh) > 0) { -- struct change *ch = xmalloc(sizeof(struct change)); - char pos[20]; - - sprintf(pos, _("line %d"), linenum); -@@ -178,6 +178,11 @@ void readconf(void) - n = strcspn(p, " \t"); - if (n > IFNAMSIZ-1) - complain(_("interface name too long at line %d"), line); -+ ch = xmalloc(sizeof(struct change)); -+ if (!ch) { -+ fclose(ifh); -+ complain(_("couldn't allocate memory at line %d"), line); -+ } - memcpy(ch->ifname, p, n); - ch->ifname[n] = 0; - p += n; -diff -up net-tools-1.60/netstat.c.coverity net-tools-1.60/netstat.c ---- net-tools-1.60/netstat.c.coverity 2011-12-06 15:12:17.000000000 +0100 -+++ net-tools-1.60/netstat.c 2011-12-06 15:32:36.060920366 +0100 -@@ -434,6 +434,8 @@ static void prg_cache_load(void) - PATH_FD_SUFFl+1); - strcpy(line + procfdlen + 1, direfd->d_name); - lnamelen=readlink(line,lname,sizeof(lname)-1); -+ if (lnamelen < 0) -+ continue; - lname[lnamelen] = '\0'; /*make it a null-terminated string*/ - - if (extract_type_1_socket_inode(lname, &inode) < 0) -@@ -833,7 +835,7 @@ static int x25_info(void) - "ESTABLISHED", - "RECOVERY" - }; -- if(!(f=proc_fopen(_PATH_PROCNET_X25))) -+ if(!f) - { - if (errno != ENOENT) { - perror(_PATH_PROCNET_X25); -@@ -1716,6 +1718,7 @@ static int ipx_info(void) - printf("\n"); - if ((ap = get_afntype(AF_IPX)) == NULL) { - EINTERN("netstat.c", "AF_IPX missing"); -+ fclose(f); - return (-1); - } - fgets(buf, 255, f); -@@ -1729,6 +1732,7 @@ static int ipx_info(void) - sport = ntohs(sport); - } else { - EINTERN("netstat.c", "ipx socket format error in source port"); -+ fclose(f); - return (-1); - } - nc = 0; -@@ -1739,6 +1743,7 @@ static int ipx_info(void) - dport = ntohs(dport); - } else { - EINTERN("netstat.c", "ipx soket format error in destination port"); -+ fclose(f); - return (-1); - } - } else diff --git a/net-tools-1.60-cycle.patch b/net-tools-1.60-cycle.patch index e29b339..e98490c 100644 --- a/net-tools-1.60-cycle.patch +++ b/net-tools-1.60-cycle.patch @@ -1,6 +1,6 @@ diff -up net-tools-1.60/lib/interface.c.cycle net-tools-1.60/lib/interface.c ---- net-tools-1.60/lib/interface.c.cycle 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/lib/interface.c 2011-12-07 16:11:38.249768234 +0100 +--- net-tools-1.60/lib/interface.c.cycle 2012-01-05 12:22:43.000000000 +0100 ++++ net-tools-1.60/lib/interface.c 2012-01-05 12:46:55.872634104 +0100 @@ -93,6 +93,7 @@ int if_list_all = 0; /* do we have reque static struct interface *int_list, *int_last; @@ -25,7 +25,7 @@ diff -up net-tools-1.60/lib/interface.c.cycle net-tools-1.60/lib/interface.c if (err) return err; } -@@ -376,6 +380,41 @@ static int if_readlist_proc(char *target +@@ -378,6 +382,41 @@ static int if_readlist_proc(char *target fclose(fh); return err; } @@ -68,8 +68,8 @@ diff -up net-tools-1.60/lib/interface.c.cycle net-tools-1.60/lib/interface.c int if_readlist(void) { diff -up net-tools-1.60/man/en_US/netstat.8.cycle net-tools-1.60/man/en_US/netstat.8 ---- net-tools-1.60/man/en_US/netstat.8.cycle 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/man/en_US/netstat.8 2011-12-07 16:11:38.249768234 +0100 +--- net-tools-1.60/man/en_US/netstat.8.cycle 2012-01-05 12:22:43.000000000 +0100 ++++ net-tools-1.60/man/en_US/netstat.8 2012-01-05 12:46:55.873634091 +0100 @@ -33,6 +33,7 @@ netstat \- Print network connections, ro .RB [ \-\-verbose | \-v ] .RB [ \-\-continuous | \-c] @@ -129,9 +129,9 @@ diff -up net-tools-1.60/man/en_US/netstat.8.cycle net-tools-1.60/man/en_US/netst .SH OUTPUT .P diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c ---- net-tools-1.60/netstat.c.cycle 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/netstat.c 2011-12-07 16:13:19.911497288 +0100 -@@ -106,9 +106,9 @@ +--- net-tools-1.60/netstat.c.cycle 2012-01-05 12:22:43.000000000 +0100 ++++ net-tools-1.60/netstat.c 2012-01-05 12:49:42.611549580 +0100 +@@ -110,9 +110,9 @@ #endif /* prototypes for statistics.c */ @@ -143,7 +143,7 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c void inittab6(void); typedef enum { -@@ -302,10 +302,10 @@ static void prg_cache_clear(void) +@@ -308,10 +308,10 @@ static void prg_cache_clear(void) prg_cache_loaded=0; } @@ -156,7 +156,7 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c } static int extract_type_1_socket_inode(const char lname[], unsigned long * inode_p) { -@@ -1610,6 +1610,8 @@ static int ipx_info(void) +@@ -1734,6 +1734,8 @@ static int rfcomm_info(void) static int iface_info(void) { @@ -165,7 +165,7 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c if (skfd < 0) { if ((skfd = sockets_open(0)) < 0) { perror("socket"); -@@ -1619,20 +1621,21 @@ static int iface_info(void) +@@ -1743,20 +1745,21 @@ static int iface_info(void) } if (flag_exp < 2) { ife_short = 1; @@ -190,7 +190,7 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c return 0; } -@@ -1648,7 +1651,7 @@ static void usage(void) +@@ -1772,7 +1775,7 @@ static void usage(void) { fprintf(stderr, _("usage: netstat [-vWeenNcCF] [] -r netstat {-V|--version|-h|--help}\n")); fprintf(stderr, _(" netstat [-vWnNcaeol] [ ...]\n")); @@ -199,7 +199,7 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c fprintf(stderr, _(" -r, --route display routing table\n")); fprintf(stderr, _(" -i, --interfaces display interface table\n")); -@@ -1685,6 +1688,7 @@ int main +@@ -1809,6 +1812,7 @@ int main (int argc, char *argv[]) { int i; int lop; @@ -207,7 +207,7 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c static struct option longopts[] = { AFTRANS_OPTS, -@@ -1844,6 +1848,12 @@ int main +@@ -1976,6 +1980,12 @@ int main flag_sta++; } @@ -220,7 +220,7 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c if (flag_int + flag_rou + flag_mas + flag_sta > 1) usage(); -@@ -1869,7 +1879,7 @@ int main +@@ -2005,7 +2015,7 @@ int main flag_not & FLAG_NUM_PORT, flag_exp); if (i || !flag_cnt) break; @@ -229,7 +229,7 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c } #else ENOSUPP("netstat", "FW_MASQUERADE"); -@@ -1881,18 +1891,18 @@ int main +@@ -2017,18 +2027,18 @@ int main if (flag_sta) { if (!afname[0]) strcpy(afname, DFLT_AF); @@ -251,7 +251,7 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c #else ENOSUPP("netstat", "AF INET6"); #endif -@@ -1900,7 +1910,11 @@ int main +@@ -2036,7 +2046,11 @@ int main printf(_("netstat: No statistics support for specified address family: %s\n"), afname); exit(1); } @@ -264,7 +264,7 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c } if (flag_rou) { -@@ -1922,7 +1936,7 @@ int main +@@ -2058,7 +2072,7 @@ int main i = route_info(afname, options); if (i || !flag_cnt) break; @@ -273,7 +273,7 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c } return (i); } -@@ -1931,7 +1945,7 @@ int main +@@ -2067,7 +2081,7 @@ int main i = iface_info(); if (!flag_cnt || i) break; @@ -282,8 +282,8 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c } return (i); } -@@ -2084,7 +2098,7 @@ int main - +@@ -2253,7 +2267,7 @@ int main + if (!flag_cnt || i) break; - wait_continous(); @@ -292,8 +292,8 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c } return (i); diff -up net-tools-1.60/statistics.c.cycle net-tools-1.60/statistics.c ---- net-tools-1.60/statistics.c.cycle 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/statistics.c 2011-12-07 16:11:38.352766947 +0100 +--- net-tools-1.60/statistics.c.cycle 2012-01-05 12:22:43.000000000 +0100 ++++ net-tools-1.60/statistics.c 2012-01-05 12:46:55.877634040 +0100 @@ -502,7 +502,7 @@ void process6_fd(FILE *f) } diff --git a/net-tools-1.60-duplicate-tcp.patch b/net-tools-1.60-duplicate-tcp.patch index 1014dd9..99769b4 100644 --- a/net-tools-1.60-duplicate-tcp.patch +++ b/net-tools-1.60-duplicate-tcp.patch @@ -1,7 +1,7 @@ diff -up net-tools-1.60/netstat.c.dup-tcp net-tools-1.60/netstat.c ---- net-tools-1.60/netstat.c.dup-tcp 2011-12-02 16:24:08.479720425 +0100 -+++ net-tools-1.60/netstat.c 2011-12-02 16:33:51.668429563 +0100 -@@ -449,6 +449,120 @@ static void prg_cache_load(void) +--- net-tools-1.60/netstat.c.dup-tcp 2011-12-07 19:17:24.162425150 +0100 ++++ net-tools-1.60/netstat.c 2011-12-07 19:18:02.161950091 +0100 +@@ -449,6 +449,121 @@ static void prg_cache_load(void) " will not be shown, you would have to be root to see it all.)\n")); } @@ -43,6 +43,7 @@ diff -up net-tools-1.60/netstat.c.dup-tcp net-tools-1.60/netstat.c + } + + /* free the bucket itself */ ++ free(tcp_node_hash[i]->socket_pair); + free(tcp_node_hash[i]); + tcp_node_hash[i] = NULL; + } @@ -122,7 +123,7 @@ diff -up net-tools-1.60/netstat.c.dup-tcp net-tools-1.60/netstat.c #if HAVE_AFNETROM static const char *netrom_state[] = { -@@ -960,6 +1074,12 @@ static void tcp_do_one(int lnr, const ch +@@ -960,6 +1075,12 @@ static void tcp_do_one(int lnr, const ch return; } @@ -135,7 +136,7 @@ diff -up net-tools-1.60/netstat.c.dup-tcp net-tools-1.60/netstat.c addr_do_one(local_addr, sizeof(local_addr), 22, ap, &localaddr, local_port, "tcp"); addr_do_one(rem_addr, sizeof(rem_addr), 22, ap, &remaddr, rem_port, "tcp"); -@@ -2112,6 +2232,7 @@ int main +@@ -2114,6 +2235,7 @@ int main break; wait_continous(reptimer); prg_cache_clear(); diff --git a/net-tools-1.60-interface_stack.patch b/net-tools-1.60-interface_stack.patch index 87aeb51..5927e58 100644 --- a/net-tools-1.60-interface_stack.patch +++ b/net-tools-1.60-interface_stack.patch @@ -1,6 +1,6 @@ diff -up net-tools-1.60/include/interface.h.stack net-tools-1.60/include/interface.h ---- net-tools-1.60/include/interface.h.stack 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/include/interface.h 2011-12-06 16:14:06.477785871 +0100 +--- net-tools-1.60/include/interface.h.stack 2012-01-05 12:22:43.000000000 +0100 ++++ net-tools-1.60/include/interface.h 2012-01-05 13:00:10.564699085 +0100 @@ -73,7 +73,7 @@ extern int do_if_print(struct interface extern int procnetdev_version(char *buf); @@ -11,8 +11,8 @@ diff -up net-tools-1.60/include/interface.h.stack net-tools-1.60/include/interfa extern void ife_print(struct interface *ptr); diff -up net-tools-1.60/lib/interface.c.stack net-tools-1.60/lib/interface.c ---- net-tools-1.60/lib/interface.c.stack 2011-12-06 16:12:32.515960556 +0100 -+++ net-tools-1.60/lib/interface.c 2011-12-06 16:12:32.520960494 +0100 +--- net-tools-1.60/lib/interface.c.stack 2012-01-05 13:00:10.561699123 +0100 ++++ net-tools-1.60/lib/interface.c 2012-01-05 13:03:19.522336790 +0100 @@ -214,10 +214,11 @@ out: return err; } @@ -26,7 +26,7 @@ diff -up net-tools-1.60/lib/interface.c.stack net-tools-1.60/lib/interface.c while (*p) { if (isspace(*p)) break; -@@ -320,9 +321,10 @@ int get_dev_fields(char *bp, struct inte +@@ -320,20 +321,22 @@ int get_dev_fields(char *bp, struct inte static int if_readlist_proc(char *target) { FILE *fh; @@ -38,21 +38,24 @@ diff -up net-tools-1.60/lib/interface.c.stack net-tools-1.60/lib/interface.c fh = fopen(_PATH_PROCNET_DEV, "r"); if (!fh) { -@@ -330,8 +332,11 @@ static int if_readlist_proc(char *target + fprintf(stderr, _("Warning: cannot open %s (%s). Limited output.\n"), _PATH_PROCNET_DEV, strerror(errno)); return -2; - } -- fgets(buf, sizeof buf, fh); /* eat line */ -- fgets(buf, sizeof buf, fh); +- } +- if (fgets(buf, sizeof buf, fh)) +- /* eat line */; +- if (fgets(buf, sizeof buf, fh)) +- /* eat line */; ++ } + if (getline(&line, &linelen, fh) == -1 /* eat line */ -+ || getline(&line, &linelen, fh) == -1) { ++ || getline(&line, &linelen, fh) == -1) { /* eat line */ + err = -1; + goto out; -+ } ++ } #if 0 /* pretty, but can't cope with missing fields */ fmt = proc_gen_fmt(_PATH_PROCNET_DEV, 1, fh, -@@ -356,13 +361,13 @@ static int if_readlist_proc(char *target +@@ -358,13 +361,13 @@ static int if_readlist_proc(char *target if (!fmt) return -1; #else @@ -70,7 +73,7 @@ diff -up net-tools-1.60/lib/interface.c.stack net-tools-1.60/lib/interface.c ife = if_cache_add(name); get_dev_fields(s, ife); ife->statistics_valid = 1; -@@ -377,6 +382,8 @@ static int if_readlist_proc(char *target +@@ -379,6 +382,8 @@ static int if_readlist_proc(char *target #if 0 free(fmt); #endif @@ -79,7 +82,7 @@ diff -up net-tools-1.60/lib/interface.c.stack net-tools-1.60/lib/interface.c fclose(fh); return err; } -@@ -384,8 +391,9 @@ static int if_readlist_proc(char *target +@@ -386,24 +391,28 @@ static int if_readlist_proc(char *target static int if_readlist_rep(char *target, struct interface *ife) { FILE *fh; @@ -90,17 +93,18 @@ diff -up net-tools-1.60/lib/interface.c.stack net-tools-1.60/lib/interface.c fh = fopen(_PATH_PROCNET_DEV, "r"); if (!fh) { -@@ -393,15 +401,18 @@ static int if_readlist_rep(char *target, + fprintf(stderr, _("Warning: cannot open %s (%s). Limited output.\n"), _PATH_PROCNET_DEV, strerror(errno)); return if_readconf(); - } +- } - fgets(buf, sizeof buf, fh); /* eat line */ - fgets(buf, sizeof buf, fh); ++ } + if (getline(&line, &linelen, fh) == -1 /* eat line */ -+ || getline(&line, &linelen, fh) == -1) { ++ || getline(&line, &linelen, fh) == -1) { /* eat line */ + err = -1; + goto out; -+ } ++ } - procnetdev_vsn = procnetdev_version(buf); + procnetdev_vsn = procnetdev_version(line); @@ -115,7 +119,7 @@ diff -up net-tools-1.60/lib/interface.c.stack net-tools-1.60/lib/interface.c get_dev_fields(s, ife); if (target && !strcmp(target,name)) { -@@ -414,6 +425,8 @@ static int if_readlist_rep(char *target, +@@ -416,6 +425,8 @@ static int if_readlist_rep(char *target, err = -1; } diff --git a/net-tools-1.60-ipx.patch b/net-tools-1.60-ipx.patch index bf132c0..6eb8f15 100644 --- a/net-tools-1.60-ipx.patch +++ b/net-tools-1.60-ipx.patch @@ -29,8 +29,3 @@ diff -up net-tools-1.60/netstat.c.ipx net-tools-1.60/netstat.c safe_strncpy(buf, ap->sprint(&sa, flag_not & FLAG_NUM_HOST), sizeof(buf)); snprintf(dad, sizeof(dad), "%s:%04X", buf, dport); } else -diff -up net-tools-1.60/version.h.ipx net-tools-1.60/version.h ---- net-tools-1.60/version.h.ipx 2011-12-01 17:02:53.265805240 +0100 -+++ net-tools-1.60/version.h 2011-12-01 17:02:53.265805240 +0100 -@@ -0,0 +1 @@ -+#define RELEASE "net-tools 1.60" diff --git a/net-tools-1.60-isofix.patch b/net-tools-1.60-isofix.patch deleted file mode 100644 index 4bbaff1..0000000 --- a/net-tools-1.60-isofix.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- net-tools-1.60/po/de.po.isofix 2000-10-28 12:59:43.000000000 +0200 -+++ net-tools-1.60/po/de.po 2005-01-10 11:29:29.407639208 +0100 -@@ -9,7 +9,7 @@ - "Last-Translator: Ralf Bächle \n" - "Language-Team:\n" - "MIME-Version: 1.0\n" --"Content-Type: text/plain; charset=iso8859-1\n" -+"Content-Type: text/plain; charset=iso-8859-1\n" - "Content-Transfer-Encoding: 8bit\n" - - #: ../arp.c:110 ../arp.c:269 ---- net-tools-1.60/po/fr.po.isofix 2000-02-20 22:47:00.000000000 +0100 -+++ net-tools-1.60/po/fr.po 2005-01-10 11:29:23.613520048 +0100 -@@ -9,7 +9,7 @@ - "Last-Translator: J.M.Vansteene \n" - "Language-Team:\n" - "MIME-Version: 1.0\n" --"Content-Type: text/plain; charset=iso8859-1\n" -+"Content-Type: text/plain; charset=iso-8859-1\n" - "Content-Transfer-Encoding: 8bit\n" - - #: ../arp.c:110 ../arp.c:269 ---- net-tools-1.60/po/pt_BR.po.isofix 2000-02-20 22:47:06.000000000 +0100 -+++ net-tools-1.60/po/pt_BR.po 2005-01-10 11:29:16.294632688 +0100 -@@ -14,7 +14,7 @@ - "PO-Revision-Date: 1999-03-01 02:38+0100\n" - "Last-Translator: Arnaldo Carvalho de Melo \n" - "MIME-Version: 1.0\n" --"Content-Type: text/plain; charset=ISO8859-9\n" -+"Content-Type: text/plain; charset=iso-8859-9\n" - "Content-Transfer-Encoding: 8bit\n" - - #: ../arp.c:110 ../arp.c:269 diff --git a/net-tools-1.60-mii-registers.patch b/net-tools-1.60-mii-registers.patch index 3045a40..398b327 100644 --- a/net-tools-1.60-mii-registers.patch +++ b/net-tools-1.60-mii-registers.patch @@ -1,6 +1,6 @@ diff -up net-tools-1.60/mii-tool.c.mii-registers net-tools-1.60/mii-tool.c ---- net-tools-1.60/mii-tool.c.mii-registers 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/mii-tool.c 2011-12-07 17:37:35.810289854 +0100 +--- net-tools-1.60/mii-tool.c.mii-registers 2012-01-05 12:22:43.000000000 +0100 ++++ net-tools-1.60/mii-tool.c 2012-01-05 13:14:54.462648840 +0100 @@ -51,10 +51,12 @@ static char Version[] = "$Id: mii-tool.c #include #include @@ -214,10 +214,10 @@ diff -up net-tools-1.60/mii-tool.c.mii-registers net-tools-1.60/mii-tool.c - printf((bmsr & MII_BMSR_LINK_VALID) ? "link ok" : "no link"); + printf((bmsr & BMSR_LSTATUS) ? "link ok" : "no link"); printf("\n capabilities:%s", media_list(bmsr >> 6, bmcr2, 0)); - printf("\n advertising: %s", media_list(advert, lpa2 >> 2, 0)); + printf("\n advertising: %s", media_list(advert, bmcr2, 0)); - if (lkpar & MII_AN_ABILITY_MASK) + if (lkpar & LPA_ABILITY_MASK) - printf("\n link partner:%s", media_list(lkpar, bmcr2, 0)); + printf("\n link partner:%s", media_list(lkpar, lpa2 >> 2, 0)); printf("\n"); } @@ -340,7 +370,7 @@ int show_basic_mii(int sock, int phy_id) diff --git a/net-tools-1.60-nameif-return.patch b/net-tools-1.60-nameif-return.patch deleted file mode 100644 index 8ef10f5..0000000 --- a/net-tools-1.60-nameif-return.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- net-tools-1.60/nameif.c.return 2004-08-03 18:01:37.000000000 +0900 -+++ net-tools-1.60/nameif.c 2004-08-03 18:03:37.000000000 +0900 -@@ -27,6 +27,7 @@ - const char *fname = default_conf; - int use_syslog; - int ctl_sk = -1; -+int frag = 0; - - void err(char *msg) - { -@@ -288,13 +289,15 @@ - while (clist) { - struct change *ch = clist; - clist = clist->next; -- if (!ch->found) -+ if (!ch->found){ - warning(_("interface '%s' not found"), ch->ifname); -+ frag = 1; -+ } - free(ch); - } - - if (use_syslog) - closelog(); -- return 0; -+ return frag; - } - diff --git a/net-tools-1.60-nameif_strncpy.patch b/net-tools-1.60-nameif_strncpy.patch deleted file mode 100644 index c2b0762..0000000 --- a/net-tools-1.60-nameif_strncpy.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up net-tools-1.60/nameif.c.strncpy net-tools-1.60/nameif.c ---- net-tools-1.60/nameif.c.strncpy 2011-12-06 12:35:36.123687853 +0100 -+++ net-tools-1.60/nameif.c 2011-12-06 12:35:36.270686015 +0100 -@@ -100,8 +100,8 @@ int setname(char *oldname, char *newnam - struct ifreq ifr; - opensock(); - memset(&ifr,0,sizeof(struct ifreq)); -- strcpy(ifr.ifr_name, oldname); -- strcpy(ifr.ifr_newname, newname); -+ strncpy(ifr.ifr_name, oldname, IFNAMSIZ); -+ strncpy(ifr.ifr_newname, newname, IFNAMSIZ); - return ioctl(ctl_sk, SIOCSIFNAME, &ifr); - } - diff --git a/net-tools-1.60-netstat-leak.patch b/net-tools-1.60-netstat-leak.patch deleted file mode 100644 index 6417f76..0000000 --- a/net-tools-1.60-netstat-leak.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up net-tools-1.60/netstat.c.netstat-leak net-tools-1.60/netstat.c ---- net-tools-1.60/netstat.c.netstat-leak 2010-09-16 10:49:49.000000000 +0200 -+++ net-tools-1.60/netstat.c 2010-09-16 10:53:47.000000000 +0200 -@@ -558,6 +558,7 @@ static void tcp_node_hash_clear(void) - } - - /* free the bucket itself */ -+ free(tcp_node_hash[i]->socket_pair); - free(tcp_node_hash[i]); - tcp_node_hash[i] = NULL; - } diff --git a/net-tools-1.60-netstat-p-basename.patch b/net-tools-1.60-netstat-p-basename.patch deleted file mode 100644 index b9fe077..0000000 --- a/net-tools-1.60-netstat-p-basename.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up net-tools-1.60/netstat.c.p-basename net-tools-1.60/netstat.c ---- net-tools-1.60/netstat.c.p-basename 2011-12-06 14:54:17.023662287 +0100 -+++ net-tools-1.60/netstat.c 2011-12-06 14:56:27.852026709 +0100 -@@ -395,7 +395,7 @@ static void prg_cache_load(void) - { - char line[LINE_MAX],eacces=0; - int procfdlen,fd,cmdllen,lnamelen; -- char lname[30],cmdlbuf[512],finbuf[PROGNAME_WIDTH]; -+ char lname[30],cmdlbuf[512],finbuf[PROGNAME_WIDTH],*cmdlpend; - unsigned long inode; - const char *cs,*cmdlp; - DIR *dirproc=NULL,*dirfd=NULL; -@@ -459,6 +459,8 @@ static void prg_cache_load(void) - cmdlp++; - else - cmdlp = cmdlbuf; -+ if ((cmdlpend = strrchr(cmdlp, ':')) != NULL) -+ *cmdlpend = '\0'; - } - - snprintf(finbuf, sizeof(finbuf), "%s/%s", direproc->d_name, cmdlp); diff --git a/net-tools-1.60-plipconfig.patch b/net-tools-1.60-plipconfig.patch deleted file mode 100644 index 2749cfd..0000000 --- a/net-tools-1.60-plipconfig.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -up net-tools-1.60/man/en_US/plipconfig.8.plipconfig net-tools-1.60/man/en_US/plipconfig.8 ---- net-tools-1.60/man/en_US/plipconfig.8.plipconfig 1999-01-09 17:19:58.000000000 +0100 -+++ net-tools-1.60/man/en_US/plipconfig.8 2011-04-14 13:07:52.000000000 +0200 -@@ -2,9 +2,9 @@ - .SH NAME - plipconfig \- fine tune PLIP device parameters - .SH SYNOPSIS --.B "plipconfig interface" -+.B "plipconfig interface [nibble NN] [trigger NN]" - .br --.B "plipconfig interface [nibble NN] [trigger NN] [unit NN]" -+.B "plipconfig [-V] [--version] [-h] [--help]" - .SH DESCRIPTION - .B Plipconfig - is used to (hopefully) improve PLIP performance by changing the default -diff -up net-tools-1.60/plipconfig.c.plipconfig net-tools-1.60/plipconfig.c ---- net-tools-1.60/plipconfig.c.plipconfig 2001-04-08 19:04:23.000000000 +0200 -+++ net-tools-1.60/plipconfig.c 2011-04-14 13:11:46.000000000 +0200 -@@ -43,9 +43,6 @@ - #include "net-support.h" - #include "version.h" - --int opt_a = 0; --int opt_i = 0; --int opt_v = 0; - int skfd = -1; - - struct ifreq ifr; -@@ -63,9 +60,9 @@ static void version(void) - - void usage(void) - { -- fprintf(stderr, _("Usage: plipconfig [-a] [-i] [-v] interface\n")); -- fprintf(stderr, _(" [nibble NN] [trigger NN]\n")); -+ fprintf(stderr, _("Usage: plipconfig interface [nibble NN] [trigger NN]\n")); - fprintf(stderr, _(" plipconfig -V | --version\n")); -+ fprintf(stderr, _(" plipconfig -h | --help\n")); - exit(-1); - } - -@@ -93,12 +90,10 @@ int main(int argc, char **argv) - argc--; - argv++; - while (argv[0] && *argv[0] == '-') { -- if (!strcmp(*argv, "-a")) -- opt_a = 1; -- if (!strcmp(*argv, "-v")) -- opt_v = 1; - if (!strcmp(*argv, "-V") || !strcmp(*argv, "--version")) - version(); -+ else -+ usage(); - argv++; - argc--; - } diff --git a/net-tools-1.60-scanf-format.patch b/net-tools-1.60-scanf-format.patch deleted file mode 100644 index a0d91ed..0000000 --- a/net-tools-1.60-scanf-format.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -up net-tools-1.60/lib/inet6_gr.c.scanf-format net-tools-1.60/lib/inet6_gr.c ---- net-tools-1.60/lib/inet6_gr.c.scanf-format 2011-12-06 13:14:57.000000000 +0100 -+++ net-tools-1.60/lib/inet6_gr.c 2011-12-06 13:21:01.417616990 +0100 -@@ -82,7 +82,7 @@ int rprint_fib6(int ext, int numeric) - "Flag Met Ref Use If\n")); - - while (fgets(buff, 1023, fp)) { -- num = sscanf(buff, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %4s%4s%4s%4s%4s%4s%4s%4s %02x %4s%4s%4s%4s%4s%4s%4s%4s %08x %08x %08x %08x %s\n", -+ num = sscanf(buff, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %4s%4s%4s%4s%4s%4s%4s%4s %02x %4s%4s%4s%4s%4s%4s%4s%4s %08x %08x %08x %08x %15s\n", - addr6p[0], addr6p[1], addr6p[2], addr6p[3], - addr6p[4], addr6p[5], addr6p[6], addr6p[7], - &prefix_len, -diff -up net-tools-1.60/lib/inet_gr.c.scanf-format net-tools-1.60/lib/inet_gr.c ---- net-tools-1.60/lib/inet_gr.c.scanf-format 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/lib/inet_gr.c 2011-12-06 13:23:25.408816852 +0100 -@@ -68,7 +68,7 @@ int rprint_fib(int ext, int numeric) - mss = 0; - - fmt = proc_gen_fmt(_PATH_PROCNET_ROUTE, 0, fp, -- "Iface", "%16s", -+ "Iface", "%15s", - "Destination", "%127s", - "Gateway", "%127s", - "Flags", "%X", -@@ -80,7 +80,7 @@ int rprint_fib(int ext, int numeric) - "Window", "%d", - "IRTT", "%d", - NULL); -- /* "%16s %127s %127s %X %d %d %d %127s %d %d %d\n" */ -+ /* "%15s %127s %127s %X %d %d %d %127s %d %d %d\n" */ - - if (!fmt) - return 1; -@@ -268,7 +268,7 @@ int rprint_cache(int ext, int numeric) - "MSS Window irtt HH Arp\n")); - - fmt = proc_gen_fmt(_PATH_PROCNET_RTCACHE, 0, fp, -- "Iface", "%16s", -+ "Iface", "%15s", - "Destination", "%127s", - "Gateway", "%127s", - "Flags", "%X", -@@ -282,7 +282,7 @@ int rprint_cache(int ext, int numeric) - "HH", "%d", - "ARP", "%d", - NULL); -- /* "%16s %127s %127s %X %d %d %d %127s %d %d %d %d %d\n" */ -+ /* "%15s %127s %127s %X %d %d %d %127s %d %d %d %d %d\n" */ - } - - if (format == 2) { -@@ -291,7 +291,7 @@ int rprint_cache(int ext, int numeric) - "Flags Metric Ref Use Iface " - "MSS Window irtt TOS HHRef HHUptod SpecDst\n")); - fmt = proc_gen_fmt(_PATH_PROCNET_RTCACHE, 0, fp, -- "Iface", "%16s", -+ "Iface", "%15s", - "Destination", "%127s", - "Gateway", "%127s", - "Flags", "%X", -@@ -307,7 +307,7 @@ int rprint_cache(int ext, int numeric) - "HHUptod", "%d", - "SpecDst", "%127s", - NULL); -- /* "%16s %127s %127s %X %d %d %d %127s %d %d %d %d %d %127s\n" */ -+ /* "%15s %127s %127s %X %d %d %d %127s %d %d %d %d %d %127s\n" */ - } - - diff --git a/net-tools-1.60-selinux.patch b/net-tools-1.60-selinux.patch index 1b08d30..8814302 100644 --- a/net-tools-1.60-selinux.patch +++ b/net-tools-1.60-selinux.patch @@ -1,14 +1,14 @@ diff -up net-tools-1.60/config.in.selinux net-tools-1.60/config.in ---- net-tools-1.60/config.in.selinux 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/config.in 2011-12-07 12:24:21.922245784 +0100 -@@ -91,3 +91,4 @@ bool 'InfiniBand hardware support' HAVE_ +--- net-tools-1.60/config.in.selinux 2012-01-05 12:22:43.000000000 +0100 ++++ net-tools-1.60/config.in 2012-01-05 13:04:45.359263680 +0100 +@@ -92,3 +92,4 @@ bool 'InfiniBand hardware support' HAVE_ bool 'IP Masquerading support' HAVE_FW_MASQUERADE y bool 'Build iptunnel and ipmaddr' HAVE_IP_TOOLS y bool 'Build mii-tool' HAVE_MII y +bool 'SELinux support' HAVE_SELINUX n diff -up net-tools-1.60/Makefile.selinux net-tools-1.60/Makefile ---- net-tools-1.60/Makefile.selinux 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/Makefile 2011-12-07 12:23:00.078268978 +0100 +--- net-tools-1.60/Makefile.selinux 2012-01-05 12:22:43.000000000 +0100 ++++ net-tools-1.60/Makefile 2012-01-05 13:04:45.359263680 +0100 @@ -114,6 +114,12 @@ endif NET_LIB = $(NET_LIB_PATH)/lib$(NET_LIB_NAME).a @@ -23,8 +23,8 @@ diff -up net-tools-1.60/Makefile.selinux net-tools-1.60/Makefile LDFLAGS += -L$(NET_LIB_PATH) diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c ---- net-tools-1.60/netstat.c.selinux 2011-12-07 12:23:00.040269453 +0100 -+++ net-tools-1.60/netstat.c 2011-12-07 12:23:00.079268965 +0100 +--- net-tools-1.60/netstat.c.selinux 2012-01-05 13:04:45.315264230 +0100 ++++ net-tools-1.60/netstat.c 2012-01-05 13:05:42.368550965 +0100 @@ -89,6 +89,11 @@ #include #include @@ -37,23 +37,23 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c #include "net-support.h" #include "pathnames.h" #include "version.h" -@@ -100,6 +105,7 @@ - #include "proc.h" +@@ -104,6 +109,7 @@ + #endif #define PROGNAME_WIDTH 20 +#define SELINUX_WIDTH 50 #if !defined(s6_addr32) && defined(in6a_words) #define s6_addr32 in6a_words /* libinet6 */ -@@ -159,6 +165,7 @@ int flag_wide= 0; - int flag_prg = 0; - int flag_arg = 0; +@@ -165,6 +171,7 @@ int flag_arg = 0; int flag_ver = 0; + int flag_l2cap = 0; + int flag_rfcomm = 0; +int flag_selinux = 0; FILE *procinfo; -@@ -222,12 +229,17 @@ FILE *procinfo; +@@ -228,12 +235,17 @@ FILE *procinfo; #define PROGNAME_WIDTH1(s) PROGNAME_WIDTH2(s) #define PROGNAME_WIDTH2(s) #s @@ -71,7 +71,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c } *prg_hash[PRG_HASH_SIZE]; static char prg_cache_loaded = 0; -@@ -235,9 +247,12 @@ static char prg_cache_loaded = 0; +@@ -241,9 +253,12 @@ static char prg_cache_loaded = 0; #define PRG_HASHIT(x) ((x) % PRG_HASH_SIZE) #define PROGNAME_BANNER "PID/Program name" @@ -84,7 +84,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c #define PRG_LOCAL_ADDRESS "local_address" #define PRG_INODE "inode" #define PRG_SOCKET_PFX "socket:[" -@@ -257,7 +272,7 @@ static char prg_cache_loaded = 0; +@@ -263,7 +278,7 @@ static char prg_cache_loaded = 0; #define PATH_CMDLINE "cmdline" #define PATH_CMDLINEl strlen(PATH_CMDLINE) @@ -93,7 +93,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c { unsigned hi = PRG_HASHIT(inode); struct prg_node **pnp,*pn; -@@ -278,6 +293,14 @@ static void prg_cache_add(unsigned long +@@ -284,6 +299,14 @@ static void prg_cache_add(unsigned long if (strlen(name)>sizeof(pn->name)-1) name[sizeof(pn->name)-1]='\0'; strcpy(pn->name,name); @@ -108,7 +108,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c } static const char *prg_cache_get(unsigned long inode) -@@ -290,6 +313,16 @@ static const char *prg_cache_get(unsigne +@@ -296,6 +319,16 @@ static const char *prg_cache_get(unsigne return("-"); } @@ -125,7 +125,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c static void prg_cache_clear(void) { struct prg_node **pnp,*pn; -@@ -367,6 +400,7 @@ static void prg_cache_load(void) +@@ -373,6 +406,7 @@ static void prg_cache_load(void) const char *cs,*cmdlp; DIR *dirproc=NULL,*dirfd=NULL; struct dirent *direproc,*direfd; @@ -133,7 +133,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c if (prg_cache_loaded || !flag_prg) return; prg_cache_loaded=1; -@@ -428,7 +462,15 @@ static void prg_cache_load(void) +@@ -436,7 +470,15 @@ static void prg_cache_load(void) } snprintf(finbuf, sizeof(finbuf), "%s/%s", direproc->d_name, cmdlp); @@ -150,7 +150,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c } closedir(dirfd); dirfd = NULL; -@@ -662,6 +704,9 @@ static void finish_this_one(int uid, uns +@@ -672,6 +714,9 @@ static void finish_this_one(int uid, uns } if (flag_prg) printf(" %-" PROGNAME_WIDTHs "s",prg_cache_get(inode)); @@ -160,7 +160,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c if (flag_opt) printf(" %s", timers); putchar('\n'); -@@ -1484,7 +1529,9 @@ static void unix_do_one(int nr, const ch +@@ -1495,7 +1540,9 @@ static void unix_do_one(int nr, const ch printf("- "); if (flag_prg) printf(" %-" PROGNAME_WIDTHs "s",(has & HAS_INODE?prg_cache_get(inode):"-")); @@ -171,7 +171,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c printf(" %s\n", path); } -@@ -1503,6 +1550,7 @@ static int unix_info(void) +@@ -1514,6 +1561,7 @@ static int unix_info(void) printf(_("\nProto RefCnt Flags Type State I-Node ")); print_progname_banner(); @@ -179,7 +179,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c printf(_(" Path\n")); /* xxx */ { -@@ -1802,6 +1850,7 @@ static void usage(void) +@@ -1927,6 +1975,7 @@ static void usage(void) fprintf(stderr, _(" -o, --timers display timers\n")); fprintf(stderr, _(" -F, --fib display Forwarding Information Base (default)\n")); fprintf(stderr, _(" -C, --cache display routing cache instead of FIB\n\n")); @@ -187,7 +187,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c fprintf(stderr, _(" ={-t|--tcp} {-u|--udp} {-U|--udplite} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n")); fprintf(stderr, _(" =Use '-6|-4' or '-A ' or '--'; default: %s\n"), DFLT_AF); -@@ -1850,6 +1899,7 @@ int main +@@ -1977,6 +2026,7 @@ int main {"cache", 0, 0, 'C'}, {"fib", 0, 0, 'F'}, {"groups", 0, 0, 'g'}, @@ -195,7 +195,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c {NULL, 0, 0, 0} }; -@@ -1861,7 +1911,7 @@ int main +@@ -1988,7 +2038,7 @@ int main getroute_init(); /* Set up AF routing support */ afname[0] = '\0'; @@ -204,7 +204,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c switch (i) { case -1: break; -@@ -1975,6 +2025,20 @@ int main +@@ -2108,6 +2158,20 @@ int main if (aftrans_opt("unix")) exit(1); break; @@ -225,7 +225,7 @@ diff -up net-tools-1.60/netstat.c.selinux net-tools-1.60/netstat.c case '?': case 'h': usage(); -@@ -2101,6 +2165,7 @@ int main +@@ -2238,6 +2302,7 @@ int main if (flag_exp > 1) printf(_(" User Inode ")); print_progname_banner(); diff --git a/net-tools-1.60-statistics-doubleword.patch b/net-tools-1.60-statistics-doubleword.patch deleted file mode 100644 index a52f0cc..0000000 --- a/net-tools-1.60-statistics-doubleword.patch +++ /dev/null @@ -1,468 +0,0 @@ -diff -up net-tools-1.60/statistics.c.doubleword net-tools-1.60/statistics.c ---- net-tools-1.60/statistics.c.doubleword 2011-12-02 15:41:03.000000000 +0100 -+++ net-tools-1.60/statistics.c 2011-12-02 15:55:22.202301865 +0100 -@@ -64,115 +64,115 @@ static enum State state; - struct entry Iptab[] = - { - {"Forwarding", N_("Forwarding is %s"), i_forward | I_STATIC}, -- {"DefaultTTL", N_("Default TTL is %u"), number | I_STATIC}, -- {"InReceives", N_("%u total packets received"), number}, -- {"InHdrErrors", N_("%u with invalid headers"), opt_number}, -- {"InAddrErrors", N_("%u with invalid addresses"), opt_number}, -- {"ForwDatagrams", N_("%u forwarded"), number}, -- {"InUnknownProtos", N_("%u with unknown protocol"), opt_number}, -- {"InDiscards", N_("%u incoming packets discarded"), number}, -- {"InDelivers", N_("%u incoming packets delivered"), number}, -- {"OutRequests", N_("%u requests sent out"), number}, /*? */ -- {"OutDiscards", N_("%u outgoing packets dropped"), opt_number}, -- {"OutNoRoutes", N_("%u dropped because of missing route"), opt_number}, -- {"ReasmTimeout", N_("%u fragments dropped after timeout"), opt_number}, -- {"ReasmReqds", N_("%u reassemblies required"), opt_number}, /* ? */ -- {"ReasmOKs", N_("%u packets reassembled ok"), opt_number}, -- {"ReasmFails", N_("%u packet reassembles failed"), opt_number}, -- {"FragOKs", N_("%u fragments received ok"), opt_number}, -- {"FragFails", N_("%u fragments failed"), opt_number}, -- {"FragCreates", N_("%u fragments created"), opt_number} -+ {"DefaultTTL", N_("Default TTL is %llu"), number | I_STATIC}, -+ {"InReceives", N_("%llu total packets received"), number}, -+ {"InHdrErrors", N_("%llu with invalid headers"), opt_number}, -+ {"InAddrErrors", N_("%llu with invalid addresses"), opt_number}, -+ {"ForwDatagrams", N_("%llu forwarded"), number}, -+ {"InUnknownProtos", N_("%llu with unknown protocol"), opt_number}, -+ {"InDiscards", N_("%llu incoming packets discarded"), number}, -+ {"InDelivers", N_("%llu incoming packets delivered"), number}, -+ {"OutRequests", N_("%llu requests sent out"), number}, /*? */ -+ {"OutDiscards", N_("%llu outgoing packets dropped"), opt_number}, -+ {"OutNoRoutes", N_("%llu dropped because of missing route"), opt_number}, -+ {"ReasmTimeout", N_("%llu fragments dropped after timeout"), opt_number}, -+ {"ReasmReqds", N_("%llu reassemblies required"), opt_number}, /* ? */ -+ {"ReasmOKs", N_("%llu packets reassembled ok"), opt_number}, -+ {"ReasmFails", N_("%llu packet reassembles failed"), opt_number}, -+ {"FragOKs", N_("%llu fragments received ok"), opt_number}, -+ {"FragFails", N_("%llu fragments failed"), opt_number}, -+ {"FragCreates", N_("%llu fragments created"), opt_number} - }; - - struct entry Ip6tab[] = - { -- {"Ip6InReceives", N_("%u total packets received"), number}, -- {"Ip6InHdrErrors", N_("%u with invalid headers"), opt_number}, -- {"Ip6InTooBigErrors", N_("%u with packets too big"), opt_number}, -- {"Ip6InNoRoutes", N_("%u incoming packets with no route"), opt_number}, -- {"Ip6InAddrErrors", N_("%u with invalid addresses"), opt_number}, -- {"Ip6InUnknownProtos", N_("%u with unknown protocol"), opt_number}, -- {"Ip6InTruncatedPkts", N_("%u with truncated packets"), opt_number}, -- {"Ip6InDiscards", N_("%u incoming packets discarded"), number}, -- {"Ip6InDelivers", N_("%u incoming packets delivered"), number}, -- {"Ip6OutForwDatagrams", N_("%u forwarded"), number}, -- {"Ip6OutRequests", N_("%u requests sent out"), number}, /*? */ -- {"Ip6OutDiscards", N_("%u outgoing packets dropped"), opt_number}, -- {"Ip6OutNoRoutes", N_("%u dropped because of missing route"), opt_number}, -- {"Ip6ReasmTimeout", N_("%u fragments dropped after timeout"), opt_number}, -- {"Ip6ReasmReqds", N_("%u reassemblies required"), opt_number}, /* ? */ -- {"Ip6ReasmOKs", N_("%u packets reassembled ok"), opt_number}, -- {"Ip6ReasmFails", N_("%u packet reassembles failed"), opt_number}, -- {"Ip6FragOKs", N_("%u fragments received ok"), opt_number}, -- {"Ip6FragFails", N_("%u fragments failed"), opt_number}, -- {"Ip6FragCreates", N_("%u fragments created"), opt_number}, -- {"Ip6InMcastPkts", N_("%u incoming multicast packets"), opt_number}, -- {"Ip6OutMcastPkts", N_("%u outgoing multicast packets"), opt_number} -+ {"Ip6InReceives", N_("%llu total packets received"), number}, -+ {"Ip6InHdrErrors", N_("%llu with invalid headers"), opt_number}, -+ {"Ip6InTooBigErrors", N_("%llu with packets too big"), opt_number}, -+ {"Ip6InNoRoutes", N_("%llu incoming packets with no route"), opt_number}, -+ {"Ip6InAddrErrors", N_("%llu with invalid addresses"), opt_number}, -+ {"Ip6InUnknownProtos", N_("%llu with unknown protocol"), opt_number}, -+ {"Ip6InTruncatedPkts", N_("%llu with truncated packets"), opt_number}, -+ {"Ip6InDiscards", N_("%llu incoming packets discarded"), number}, -+ {"Ip6InDelivers", N_("%llu incoming packets delivered"), number}, -+ {"Ip6OutForwDatagrams", N_("%llu forwarded"), number}, -+ {"Ip6OutRequests", N_("%llu requests sent out"), number}, /*? */ -+ {"Ip6OutDiscards", N_("%llu outgoing packets dropped"), opt_number}, -+ {"Ip6OutNoRoutes", N_("%llu dropped because of missing route"), opt_number}, -+ {"Ip6ReasmTimeout", N_("%llu fragments dropped after timeout"), opt_number}, -+ {"Ip6ReasmReqds", N_("%llu reassemblies required"), opt_number}, /* ? */ -+ {"Ip6ReasmOKs", N_("%llu packets reassembled ok"), opt_number}, -+ {"Ip6ReasmFails", N_("%llu packet reassembles failed"), opt_number}, -+ {"Ip6FragOKs", N_("%llu fragments received ok"), opt_number}, -+ {"Ip6FragFails", N_("%llu fragments failed"), opt_number}, -+ {"Ip6FragCreates", N_("%llu fragments created"), opt_number}, -+ {"Ip6InMcastPkts", N_("%llu incoming multicast packets"), opt_number}, -+ {"Ip6OutMcastPkts", N_("%llu outgoing multicast packets"), opt_number} - }; - - struct entry Icmptab[] = - { -- {"InMsgs", N_("%u ICMP messages received"), number}, -- {"InErrors", N_("%u input ICMP message failed."), number}, -- {"InDestUnreachs", N_("destination unreachable: %u"), i_inp_icmp | I_TITLE}, -- {"InTimeExcds", N_("timeout in transit: %u"), i_inp_icmp | I_TITLE}, -- {"InParmProbs", N_("wrong parameters: %u"), i_inp_icmp | I_TITLE}, /*? */ -- {"InSrcQuenchs", N_("source quenches: %u"), i_inp_icmp | I_TITLE}, -- {"InRedirects", N_("redirects: %u"), i_inp_icmp | I_TITLE}, -- {"InEchos", N_("echo requests: %u"), i_inp_icmp | I_TITLE}, -- {"InEchoReps", N_("echo replies: %u"), i_inp_icmp | I_TITLE}, -- {"InTimestamps", N_("timestamp request: %u"), i_inp_icmp | I_TITLE}, -- {"InTimestampReps", N_("timestamp reply: %u"), i_inp_icmp | I_TITLE}, -- {"InAddrMasks", N_("address mask request: %u"), i_inp_icmp | I_TITLE}, /*? */ -- {"InAddrMaskReps", N_("address mask replies: %u"), i_inp_icmp | I_TITLE}, /*? */ -- {"OutMsgs", N_("%u ICMP messages sent"), number}, -- {"OutErrors", N_("%u ICMP messages failed"), number}, -- {"OutDestUnreachs", N_("destination unreachable: %u"), i_outp_icmp | I_TITLE}, -- {"OutTimeExcds", N_("time exceeded: %u"), i_outp_icmp | I_TITLE}, -- {"OutParmProbs", N_("wrong parameters: %u"), i_outp_icmp | I_TITLE}, /*? */ -- {"OutSrcQuenchs", N_("source quench: %u"), i_outp_icmp | I_TITLE}, -- {"OutRedirects", N_("redirect: %u"), i_outp_icmp | I_TITLE}, -- {"OutEchos", N_("echo request: %u"), i_outp_icmp | I_TITLE}, -- {"OutEchoReps", N_("echo replies: %u"), i_outp_icmp | I_TITLE}, -- {"OutTimestamps", N_("timestamp requests: %u"), i_outp_icmp | I_TITLE}, -- {"OutTimestampReps", N_("timestamp replies: %u"), i_outp_icmp | I_TITLE}, -- {"OutAddrMasks", N_("address mask requests: %u"), i_outp_icmp | I_TITLE}, -- {"OutAddrMaskReps", N_("address mask replies: %u"), i_outp_icmp | I_TITLE}, -+ {"InMsgs", N_("%llu ICMP messages received"), number}, -+ {"InErrors", N_("%llu input ICMP message failed."), number}, -+ {"InDestUnreachs", N_("destination unreachable: %llu"), i_inp_icmp | I_TITLE}, -+ {"InTimeExcds", N_("timeout in transit: %llu"), i_inp_icmp | I_TITLE}, -+ {"InParmProbs", N_("wrong parameters: %llu"), i_inp_icmp | I_TITLE}, /*? */ -+ {"InSrcQuenchs", N_("source quenches: %llu"), i_inp_icmp | I_TITLE}, -+ {"InRedirects", N_("redirects: %llu"), i_inp_icmp | I_TITLE}, -+ {"InEchos", N_("echo requests: %llu"), i_inp_icmp | I_TITLE}, -+ {"InEchoReps", N_("echo replies: %llu"), i_inp_icmp | I_TITLE}, -+ {"InTimestamps", N_("timestamp request: %llu"), i_inp_icmp | I_TITLE}, -+ {"InTimestampReps", N_("timestamp reply: %llu"), i_inp_icmp | I_TITLE}, -+ {"InAddrMasks", N_("address mask request: %llu"), i_inp_icmp | I_TITLE}, /*? */ -+ {"InAddrMaskReps", N_("address mask replies: %llu"), i_inp_icmp | I_TITLE}, /*? */ -+ {"OutMsgs", N_("%llu ICMP messages sent"), number}, -+ {"OutErrors", N_("%llu ICMP messages failed"), number}, -+ {"OutDestUnreachs", N_("destination unreachable: %llu"), i_outp_icmp | I_TITLE}, -+ {"OutTimeExcds", N_("time exceeded: %llu"), i_outp_icmp | I_TITLE}, -+ {"OutParmProbs", N_("wrong parameters: %llu"), i_outp_icmp | I_TITLE}, /*? */ -+ {"OutSrcQuenchs", N_("source quench: %llu"), i_outp_icmp | I_TITLE}, -+ {"OutRedirects", N_("redirect: %llu"), i_outp_icmp | I_TITLE}, -+ {"OutEchos", N_("echo request: %llu"), i_outp_icmp | I_TITLE}, -+ {"OutEchoReps", N_("echo replies: %llu"), i_outp_icmp | I_TITLE}, -+ {"OutTimestamps", N_("timestamp requests: %llu"), i_outp_icmp | I_TITLE}, -+ {"OutTimestampReps", N_("timestamp replies: %llu"), i_outp_icmp | I_TITLE}, -+ {"OutAddrMasks", N_("address mask requests: %llu"), i_outp_icmp | I_TITLE}, -+ {"OutAddrMaskReps", N_("address mask replies: %llu"), i_outp_icmp | I_TITLE}, - }; - - struct entry Icmp6tab[] = - { -- {"Icmp6InMsgs", N_("%u ICMP messages received"), number}, -- {"Icmp6InErrors", N_("%u input ICMP message failed."), number}, -- {"Icmp6InDestUnreachs", N_("destination unreachable: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6InPktTooBigs", N_("packets too big: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6InTimeExcds", N_("received ICMPv6 time exceeded: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6InParmProblems", N_("parameter problem: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6InEchos", N_("echo requests: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6InEchoReplies", N_("echo replies: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6InGroupMembQueries", N_("group member queries: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6InGroupMembResponses", N_("group member responses: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6InGroupMembReductions", N_("group member reductions: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6InRouterSolicits", N_("router solicits: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6InRouterAdvertisements", N_("router advertisement: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6InNeighborSolicits", N_("neighbour solicits: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6InNeighborAdvertisements", N_("neighbour advertisement: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6InRedirects", N_("redirects: %u"), i_inp_icmp | I_TITLE}, -- {"Icmp6OutMsgs", N_("%u ICMP messages sent"), number}, -- {"Icmp6OutDestUnreachs", N_("destination unreachable: %u"), i_outp_icmp | I_TITLE}, -- {"Icmp6OutPktTooBigs", N_("packets too big: %u"), i_outp_icmp | I_TITLE}, -- {"Icmp6OutTimeExcds", N_("sent ICMPv6 time exceeded: %u"), i_outp_icmp | I_TITLE}, -- {"Icmp6OutParmProblems", N_("parameter problem: %u"), i_outp_icmp | I_TITLE}, -- {"Icmp6OutEchos", N_("echo requests: %u"), i_outp_icmp | I_TITLE}, -- {"Icmp6OutEchoReplies", N_("echo replies: %u"), i_outp_icmp | I_TITLE}, -- {"Icmp6OutGroupMembQueries", N_("group member queries: %u"), i_outp_icmp | I_TITLE}, -- {"Icmp6OutGroupMembResponses", N_("group member responses: %u"), i_outp_icmp | I_TITLE}, -- {"Icmp6OutGroupMembReductions", N_("group member reductions: %u"), i_outp_icmp | I_TITLE}, -- {"Icmp6OutRouterSolicits", N_("router solicits: %u"), i_outp_icmp | I_TITLE}, -- {"Icmp6OutRouterAdvertisements ", N_("router advertisement: %u"), i_outp_icmp | I_TITLE}, -- {"Icmp6OutNeighborSolicits", N_("neighbor solicits: %u"), i_outp_icmp | I_TITLE}, -- {"Icmp6OutNeighborAdvertisements", N_("neighbor advertisements: %u"), i_outp_icmp | I_TITLE}, -- {"Icmp6OutRedirects", N_("redirects: %u"), i_outp_icmp | I_TITLE}, -+ {"Icmp6InMsgs", N_("%llu ICMP messages received"), number}, -+ {"Icmp6InErrors", N_("%llu input ICMP message failed."), number}, -+ {"Icmp6InDestUnreachs", N_("destination unreachable: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6InPktTooBigs", N_("packets too big: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6InTimeExcds", N_("received ICMPv6 time exceeded: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6InParmProblems", N_("parameter problem: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6InEchos", N_("echo requests: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6InEchoReplies", N_("echo replies: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6InGroupMembQueries", N_("group member queries: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6InGroupMembResponses", N_("group member responses: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6InGroupMembReductions", N_("group member reductions: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6InRouterSolicits", N_("router solicits: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6InRouterAdvertisements", N_("router advertisement: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6InNeighborSolicits", N_("neighbour solicits: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6InNeighborAdvertisements", N_("neighbour advertisement: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6InRedirects", N_("redirects: %llu"), i_inp_icmp | I_TITLE}, -+ {"Icmp6OutMsgs", N_("%llu ICMP messages sent"), number}, -+ {"Icmp6OutDestUnreachs", N_("destination unreachable: %llu"), i_outp_icmp | I_TITLE}, -+ {"Icmp6OutPktTooBigs", N_("packets too big: %llu"), i_outp_icmp | I_TITLE}, -+ {"Icmp6OutTimeExcds", N_("sent ICMPv6 time exceeded: %llu"), i_outp_icmp | I_TITLE}, -+ {"Icmp6OutParmProblems", N_("parameter problem: %llu"), i_outp_icmp | I_TITLE}, -+ {"Icmp6OutEchos", N_("echo requests: %llu"), i_outp_icmp | I_TITLE}, -+ {"Icmp6OutEchoReplies", N_("echo replies: %llu"), i_outp_icmp | I_TITLE}, -+ {"Icmp6OutGroupMembQueries", N_("group member queries: %llu"), i_outp_icmp | I_TITLE}, -+ {"Icmp6OutGroupMembResponses", N_("group member responses: %llu"), i_outp_icmp | I_TITLE}, -+ {"Icmp6OutGroupMembReductions", N_("group member reductions: %llu"), i_outp_icmp | I_TITLE}, -+ {"Icmp6OutRouterSolicits", N_("router solicits: %llu"), i_outp_icmp | I_TITLE}, -+ {"Icmp6OutRouterAdvertisements ", N_("router advertisement: %llu"), i_outp_icmp | I_TITLE}, -+ {"Icmp6OutNeighborSolicits", N_("neighbor solicits: %llu"), i_outp_icmp | I_TITLE}, -+ {"Icmp6OutNeighborAdvertisements", N_("neighbor advertisements: %llu"), i_outp_icmp | I_TITLE}, -+ {"Icmp6OutRedirects", N_("redirects: %llu"), i_outp_icmp | I_TITLE}, - }; - - struct entry Tcptab[] = -@@ -181,122 +181,122 @@ struct entry Tcptab[] = - {"RtoMin", "", number}, - {"RtoMax", "", number}, - {"MaxConn", "", number}, -- {"ActiveOpens", N_("%u active connections openings"), number}, -- {"PassiveOpens", N_("%u passive connection openings"), number}, -- {"AttemptFails", N_("%u failed connection attempts"), number}, -- {"EstabResets", N_("%u connection resets received"), number}, -- {"CurrEstab", N_("%u connections established"), number}, -- {"InSegs", N_("%u segments received"), number}, -- {"OutSegs", N_("%u segments send out"), number}, -- {"RetransSegs", N_("%u segments retransmited"), number}, -- {"InErrs", N_("%u bad segments received."), number}, -- {"OutRsts", N_("%u resets sent"), number}, -+ {"ActiveOpens", N_("%llu active connections openings"), number}, -+ {"PassiveOpens", N_("%llu passive connection openings"), number}, -+ {"AttemptFails", N_("%llu failed connection attempts"), number}, -+ {"EstabResets", N_("%llu connection resets received"), number}, -+ {"CurrEstab", N_("%llu connections established"), number}, -+ {"InSegs", N_("%llu segments received"), number}, -+ {"OutSegs", N_("%llu segments send out"), number}, -+ {"RetransSegs", N_("%llu segments retransmited"), number}, -+ {"InErrs", N_("%llu bad segments received."), number}, -+ {"OutRsts", N_("%llu resets sent"), number}, - }; - - struct entry Udptab[] = - { -- {"InDatagrams", N_("%u packets received"), number}, -- {"NoPorts", N_("%u packets to unknown port received."), number}, -- {"InErrors", N_("%u packet receive errors"), number}, -- {"OutDatagrams", N_("%u packets sent"), number}, -- {"RcvbufErrors", N_("%u receive buffer errors"), number}, -- {"SndbufErrors", N_("%u send buffer errors"), number}, -+ {"InDatagrams", N_("%llu packets received"), number}, -+ {"NoPorts", N_("%llu packets to unknown port received."), number}, -+ {"InErrors", N_("%llu packet receive errors"), number}, -+ {"OutDatagrams", N_("%llu packets sent"), number}, -+ {"RcvbufErrors", N_("%llu receive buffer errors"), number}, -+ {"SndbufErrors", N_("%llu send buffer errors"), number}, - }; - - struct entry Udp6tab[] = - { -- {"Udp6InDatagrams", N_("%u packets received"), number}, -- {"Udp6NoPorts", N_("%u packets to unknown port received."), number}, -- {"Udp6InErrors", N_("%u packet receive errors"), number}, -- {"Udp6OutDatagrams", N_("%u packets sent"), number}, -+ {"Udp6InDatagrams", N_("%llu packets received"), number}, -+ {"Udp6NoPorts", N_("%llu packets to unknown port received."), number}, -+ {"Udp6InErrors", N_("%llu packet receive errors"), number}, -+ {"Udp6OutDatagrams", N_("%llu packets sent"), number}, - }; - - struct entry Tcpexttab[] = - { -- {"SyncookiesSent", N_("%u SYN cookies sent"), opt_number}, -- {"SyncookiesRecv", N_("%u SYN cookies received"), opt_number}, -- {"SyncookiesFailed", N_("%u invalid SYN cookies received"), opt_number}, -+ {"SyncookiesSent", N_("%llu SYN cookies sent"), opt_number}, -+ {"SyncookiesRecv", N_("%llu SYN cookies received"), opt_number}, -+ {"SyncookiesFailed", N_("%llu invalid SYN cookies received"), opt_number}, - -- { "EmbryonicRsts", N_("%u resets received for embryonic SYN_RECV sockets"), -+ { "EmbryonicRsts", N_("%llu resets received for embryonic SYN_RECV sockets"), - opt_number }, -- { "PruneCalled", N_("%u packets pruned from receive queue because of socket" -+ { "PruneCalled", N_("%llu packets pruned from receive queue because of socket" - " buffer overrun"), opt_number }, - /* obsolete: 2.2.0 doesn't do that anymore */ -- { "RcvPruned", N_("%u packets pruned from receive queue"), opt_number }, -- { "OfoPruned", N_("%u packets dropped from out-of-order queue because of" -+ { "RcvPruned", N_("%llu packets pruned from receive queue"), opt_number }, -+ { "OfoPruned", N_("%llu packets dropped from out-of-order queue because of" - " socket buffer overrun"), opt_number }, -- { "OutOfWindowIcmps", N_("%u ICMP packets dropped because they were " -+ { "OutOfWindowIcmps", N_("%llu ICMP packets dropped because they were " - "out-of-window"), opt_number }, -- { "LockDroppedIcmps", N_("%u ICMP packets dropped because" -+ { "LockDroppedIcmps", N_("%llu ICMP packets dropped because" - " socket was locked"), opt_number }, -- { "TW", N_("%u TCP sockets finished time wait in fast timer"), opt_number }, -- { "TWRecycled", N_("%u time wait sockets recycled by time stamp"), opt_number }, -- { "TWKilled", N_("%u TCP sockets finished time wait in slow timer"), opt_number }, -- { "PAWSPassive", N_("%u passive connections rejected because of" -+ { "TW", N_("%llu TCP sockets finished time wait in fast timer"), opt_number }, -+ { "TWRecycled", N_("%llu time wait sockets recycled by time stamp"), opt_number }, -+ { "TWKilled", N_("%llu TCP sockets finished time wait in slow timer"), opt_number }, -+ { "PAWSPassive", N_("%llu passive connections rejected because of" - " time stamp"), opt_number }, -- { "PAWSActive", N_("%u active connections rejected because of " -+ { "PAWSActive", N_("%llu active connections rejected because of " - "time stamp"), opt_number }, -- { "PAWSEstab", N_("%u packets rejects in established connections because of" -+ { "PAWSEstab", N_("%llu packets rejects in established connections because of" - " timestamp"), opt_number }, -- { "DelayedACKs", N_("%u delayed acks sent"), opt_number }, -- { "DelayedACKLocked", N_("%u delayed acks further delayed because of" -+ { "DelayedACKs", N_("%llu delayed acks sent"), opt_number }, -+ { "DelayedACKLocked", N_("%llu delayed acks further delayed because of" - " locked socket"), opt_number }, -- { "DelayedACKLost", N_("Quick ack mode was activated %u times"), opt_number }, -- { "ListenOverflows", N_("%u times the listen queue of a socket overflowed"), -+ { "DelayedACKLost", N_("Quick ack mode was activated %llu times"), opt_number }, -+ { "ListenOverflows", N_("%llu times the listen queue of a socket overflowed"), - opt_number }, -- { "ListenDrops", N_("%u SYNs to LISTEN sockets dropped"), opt_number }, -- { "TCPPrequeued", N_("%u packets directly queued to recvmsg prequeue."), -+ { "ListenDrops", N_("%llu SYNs to LISTEN sockets dropped"), opt_number }, -+ { "TCPPrequeued", N_("%llu packets directly queued to recvmsg prequeue."), - opt_number }, -- { "TCPDirectCopyFromBacklog", N_("%u bytes directly in process context from backlog"), opt_number }, -- { "TCPDirectCopyFromPrequeue", N_("%u bytes directly received in process context from prequeue"), -+ { "TCPDirectCopyFromBacklog", N_("%llu bytes directly in process context from backlog"), opt_number }, -+ { "TCPDirectCopyFromPrequeue", N_("%llu bytes directly received in process context from prequeue"), - opt_number }, -- { "TCPPrequeueDropped", N_("%u packets dropped from prequeue"), opt_number }, -- { "TCPHPHits", N_("%u packet headers predicted"), number }, -- { "TCPHPHitsToUser", N_("%u packets header predicted and " -+ { "TCPPrequeueDropped", N_("%llu packets dropped from prequeue"), opt_number }, -+ { "TCPHPHits", N_("%llu packet headers predicted"), number }, -+ { "TCPHPHitsToUser", N_("%llu packets header predicted and " - "directly queued to user"), opt_number }, -- { "SockMallocOOM", N_("Ran %u times out of system memory during " -+ { "SockMallocOOM", N_("Ran %llu times out of system memory during " - "packet sending"), opt_number }, -- { "TCPPureAcks", N_("%u acknowledgments not containing data payload received"), opt_number }, -- { "TCPHPAcks", N_("%u predicted acknowledgments"), opt_number }, -- { "TCPRenoRecovery", N_("%u times recovered from packet loss due to fast retransmit"), opt_number }, -- { "TCPSackRecovery", N_("%u times recovered from packet loss by selective acknowledgements"), opt_number }, -- { "TCPSACKReneging", N_("%u bad SACK blocks received"), opt_number }, -- { "TCPFACKReorder", N_("Detected reordering %u times using FACK"), opt_number }, -- { "TCPSACKReorder", N_("Detected reordering %u times using SACK"), opt_number }, -- { "TCPTSReorder", N_("Detected reordering %u times using time stamp"), opt_number }, -- { "TCPRenoReorder", N_("Detected reordering %u times using reno fast retransmit"), opt_number }, -- { "TCPFullUndo", N_("%u congestion windows fully recovered without slow start"), opt_number }, -- { "TCPPartialUndo", N_("%u congestion windows partially recovered using Hoe heuristic"), opt_number }, -- { "TCPDSackUndo", N_("%u congestion window recovered without slow start using DSACK"), opt_number }, -- { "TCPLossUndo", N_("%u congestion windows recovered without slow start after partial ack"), opt_number }, -- { "TCPLostRetransmits", N_("%u retransmits lost"), opt_number }, -- { "TCPRenoFailures", N_("%u timeouts after reno fast retransmit"), opt_number }, -- { "TCPSackFailures", N_("%u timeouts after SACK recovery"), opt_number }, -- { "TCPLossFailures", N_("%u timeouts in loss state"), opt_number }, -- { "TCPFastRetrans", N_("%u fast retransmits"), opt_number }, -- { "TCPForwardRetrans", N_("%u forward retransmits"), opt_number }, -- { "TCPSlowStartRetrans", N_("%u retransmits in slow start"), opt_number }, -- { "TCPTimeouts", N_("%u other TCP timeouts"), opt_number }, -- { "TCPRenoRecoveryFailed", N_("%u reno fast retransmits failed"), opt_number }, -- { "TCPSackRecoveryFail", N_("%u SACK retransmits failed"), opt_number }, -- { "TCPSchedulerFailed", N_("%u times receiver scheduled too late for direct processing"), opt_number }, -- { "TCPRcvCollapsed", N_("%u packets collapsed in receive queue due to low socket buffer"), opt_number }, -- { "TCPDSACKOldSent", N_("%u DSACKs sent for old packets"), opt_number }, -- { "TCPDSACKOfoSent", N_("%u DSACKs sent for out of order packets"), opt_number }, -- { "TCPDSACKRecv", N_("%u DSACKs received"), opt_number }, -- { "TCPDSACKOfoRecv", N_("%u DSACKs for out of order packets received"), opt_number }, -- { "TCPAbortOnSyn", N_("%u connections reset due to unexpected SYN"), opt_number }, -- { "TCPAbortOnData", N_("%u connections reset due to unexpected data"), opt_number }, -- { "TCPAbortOnClose", N_("%u connections reset due to early user close"), opt_number }, -- { "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 }, -- { "TCPMemoryPressures", N_("TCP ran low on memory %u times"), opt_number }, -- { "TCPLoss", N_("%u TCP data loss events"), opt_number }, -- { "TCPDSACKUndo", N_("%u congestion windows recovered without slow start by DSACK"), -+ { "TCPPureAcks", N_("%llu acknowledgments not containing data payload received"), opt_number }, -+ { "TCPHPAcks", N_("%llu predicted acknowledgments"), opt_number }, -+ { "TCPRenoRecovery", N_("%llu times recovered from packet loss due to fast retransmit"), opt_number }, -+ { "TCPSackRecovery", N_("%llu times recovered from packet loss by selective acknowledgements"), opt_number }, -+ { "TCPSACKReneging", N_("%llu bad SACK blocks received"), opt_number }, -+ { "TCPFACKReorder", N_("Detected reordering %llu times using FACK"), opt_number }, -+ { "TCPSACKReorder", N_("Detected reordering %llu times using SACK"), opt_number }, -+ { "TCPTSReorder", N_("Detected reordering %llu times using time stamp"), opt_number }, -+ { "TCPRenoReorder", N_("Detected reordering %llu times using reno fast retransmit"), opt_number }, -+ { "TCPFullUndo", N_("%llu congestion windows fully recovered without slow start"), opt_number }, -+ { "TCPPartialUndo", N_("%llu congestion windows partially recovered using Hoe heuristic"), opt_number }, -+ { "TCPDSackUndo", N_("%llu congestion window recovered without slow start using DSACK"), opt_number }, -+ { "TCPLossUndo", N_("%llu congestion windows recovered without slow start after partial ack"), opt_number }, -+ { "TCPLostRetransmits", N_("%llu retransmits lost"), opt_number }, -+ { "TCPRenoFailures", N_("%llu timeouts after reno fast retransmit"), opt_number }, -+ { "TCPSackFailures", N_("%llu timeouts after SACK recovery"), opt_number }, -+ { "TCPLossFailures", N_("%llu timeouts in loss state"), opt_number }, -+ { "TCPFastRetrans", N_("%llu fast retransmits"), opt_number }, -+ { "TCPForwardRetrans", N_("%llu forward retransmits"), opt_number }, -+ { "TCPSlowStartRetrans", N_("%llu retransmits in slow start"), opt_number }, -+ { "TCPTimeouts", N_("%llu other TCP timeouts"), opt_number }, -+ { "TCPRenoRecoveryFailed", N_("%llu reno fast retransmits failed"), opt_number }, -+ { "TCPSackRecoveryFail", N_("%llu SACK retransmits failed"), opt_number }, -+ { "TCPSchedulerFailed", N_("%llu times receiver scheduled too late for direct processing"), opt_number }, -+ { "TCPRcvCollapsed", N_("%llu packets collapsed in receive queue due to low socket buffer"), opt_number }, -+ { "TCPDSACKOldSent", N_("%llu DSACKs sent for old packets"), opt_number }, -+ { "TCPDSACKOfoSent", N_("%llu DSACKs sent for out of order packets"), opt_number }, -+ { "TCPDSACKRecv", N_("%llu DSACKs received"), opt_number }, -+ { "TCPDSACKOfoRecv", N_("%llu DSACKs for out of order packets received"), opt_number }, -+ { "TCPAbortOnSyn", N_("%llu connections reset due to unexpected SYN"), opt_number }, -+ { "TCPAbortOnData", N_("%llu connections reset due to unexpected data"), opt_number }, -+ { "TCPAbortOnClose", N_("%llu connections reset due to early user close"), opt_number }, -+ { "TCPAbortOnMemory", N_("%llu connections aborted due to memory pressure"), opt_number }, -+ { "TCPAbortOnTimeout", N_("%llu connections aborted due to timeout"), opt_number }, -+ { "TCPAbortOnLinger", N_("%llu connections aborted after user close in linger timeout"), opt_number }, -+ { "TCPAbortFailed", N_("%llu times unabled to send RST due to no memory"), opt_number }, -+ { "TCPMemoryPressures", N_("TCP ran low on memory %llu times"), opt_number }, -+ { "TCPLoss", N_("%llu TCP data loss events"), opt_number }, -+ { "TCPDSACKUndo", N_("%llu congestion windows recovered without slow start by DSACK"), - opt_number }, -- { "TCPRenoRecoveryFail", N_("%u classic Reno fast retransmits failed"), opt_number }, -+ { "TCPRenoRecoveryFail", N_("%llu classic Reno fast retransmits failed"), opt_number }, - }; - - struct tabtab { -@@ -332,7 +332,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; -@@ -344,7 +344,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; -@@ -454,7 +454,7 @@ int process_fd(FILE *f, int all, char *f - *p = '\0'; - - if (*sp != '\0' && *(tab->flag)) -- printval(tab, sp, strtoul(np, &np, 10)); -+ printval(tab, sp, strtoull(np, &np, 10)); - - sp = p + 1; - } -@@ -481,12 +481,12 @@ void cpytitle(char *original, char *new) - void process6_fd(FILE *f) - { - char buf1[1024],buf2[50],buf3[1024]; -- unsigned long val; -+ unsigned long long val; - struct tabtab *tab = NULL; - int cpflg = 0; - - while (fgets(buf1, sizeof buf1, f)) { -- sscanf(buf1, "%s %lu", buf2, &val); -+ sscanf(buf1, "%s %llu", buf2, &val); - if(!cpflg) { - cpytitle(buf2, buf3); - tab = newtable(snmp6tabs, buf3); diff --git a/net-tools-1.60-x25-proc.patch b/net-tools-1.60-x25-proc.patch deleted file mode 100644 index 4e00e76..0000000 --- a/net-tools-1.60-x25-proc.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up net-tools-1.60/lib/pathnames.h.x25 net-tools-1.60/lib/pathnames.h ---- net-tools-1.60/lib/pathnames.h.x25 2011-11-21 02:31:57.000000000 +0100 -+++ net-tools-1.60/lib/pathnames.h 2011-12-05 17:00:49.917886688 +0100 -@@ -49,8 +49,8 @@ - #define _PATH_PROCNET_RARP "/proc/net/rarp" - #define _PATH_ETHERS "/etc/ethers" - #define _PATH_PROCNET_ROSE_ROUTE "/proc/net/rose_routes" --#define _PATH_PROCNET_X25 "/proc/net/x25" --#define _PATH_PROCNET_X25_ROUTE "/proc/net/x25_routes" -+#define _PATH_PROCNET_X25 "/proc/net/x25" -+#define _PATH_PROCNET_X25_ROUTE "/proc/net/x25/route" - #define _PATH_PROCNET_DEV_MCAST "/proc/net/dev_mcast" - #define _PATH_PROCNET_ATALK_ROUTE "/proc/net/atalk_route" - diff --git a/net-tools.spec b/net-tools.spec index 1ea879e..2f0a802 100644 --- a/net-tools.spec +++ b/net-tools.spec @@ -1,9 +1,9 @@ -%global checkout 20111207git +%global checkout 20120105git Summary: Basic networking tools Name: net-tools Version: 1.60 -Release: 130.%{checkout}%{?dist} +Release: 131.%{checkout}%{?dist} License: GPL+ Group: System Environment/Base URL: http://net-tools.sourceforge.net @@ -20,102 +20,60 @@ Source7: iptunnel.8 Source8: ipmaddr.8 Source9: arp-ethers.service -# translation headers - content type format -Patch1: net-tools-1.60-isofix.patch - # adds option that allows netstat to cycle printing through statistics every delay seconds. -Patch2: net-tools-1.60-cycle.patch +Patch1: net-tools-1.60-cycle.patch # Fixed incorrect address display for ipx (#46434) -Patch3: net-tools-1.60-ipx.patch +Patch2: net-tools-1.60-ipx.patch # hostname lookup problems with route --inet6 (#84108) -Patch4: net-tools-1.60-inet6-lookup.patch +Patch3: net-tools-1.60-inet6-lookup.patch # various man page fixes merged into one patch -Patch5: net-tools-1.60-man.patch +Patch4: net-tools-1.60-man.patch # netstat: interface option now works as described in the man page (#61113, #115987) -Patch6: net-tools-1.60-interface.patch - -# The return value of nameif was wrong (#129032) - patch from Fujitsu QA -Patch7: net-tools-1.60-nameif-return.patch - -# netstat -s (statistics.c) now uses unsigned long long handle 64 bit integers (Bug #579854, Debian #561161) -Patch8: net-tools-1.60-statistics-doubleword.patch - -# calculate broadcast only when netmask provided (#60509) -Patch9: net-tools-1.60-bcast.patch +Patch5: net-tools-1.60-interface.patch # filter out duplicate tcp entries (#139407) -Patch10: net-tools-1.60-duplicate-tcp.patch +Patch6: net-tools-1.60-duplicate-tcp.patch # don't report statistics for virtual devices (#143981) -Patch11: net-tools-1.60-statalias.patch +Patch7: net-tools-1.60-statalias.patch # don't trim interface names to 5 characters in 'netstat -i' or 'ifconfig -s' (#152457) -Patch12: net-tools-1.60-trim_iface.patch - -# buffer overflow in arp (#164695) -Patch13: net-tools-1.60-arp_overflow.patch +Patch8: net-tools-1.60-trim_iface.patch # clear static buffers in interface.c by Ulrich Drepper (#176714) -Patch14: net-tools-1.60-interface_stack.patch +Patch9: net-tools-1.60-interface_stack.patch # new option for nestat, -Z shows selinux context -Patch15: net-tools-1.60-selinux.patch +Patch10: net-tools-1.60-selinux.patch # remove duplicate arp entries (#185604) -Patch16: net-tools-1.60-fgets.patch - -# wrong definition of _PATH_PROCNET_X25_ROUTE (#188786) -Patch17: net-tools-1.60-x25-proc.patch +Patch11: net-tools-1.60-fgets.patch # statistics for SCTP -Patch18: net-tools-1.60-sctp-statistics.patch +Patch12: net-tools-1.60-sctp-statistics.patch # ifconfig crash when interface name is too long (#190703) -Patch19: net-tools-1.60-ifconfig-long-iface-crasher.patch - -# nameif crash for 16char long interface names (#209120) -Patch20: net-tools-1.60-nameif_strncpy.patch - -# fixed clearing flags in ifconfig (#450252) -Patch21: net-tools-1.60-clear-flag.patch +Patch13: net-tools-1.60-ifconfig-long-iface-crasher.patch # fixed tcp timers info in netstat (#466845) -Patch22: net-tools-1.60-netstat-probe.patch - -# prevent 'netstat -nr -A inet6' from smashing stack (#668047) -Patch23: net-tools-1.60-scanf-format.patch +Patch14: net-tools-1.60-netstat-probe.patch # let the user know that ifconfig can correctly show only first 8 bytes of Infiniband hw address -Patch24: net-tools-1.60-ib-warning.patch +Patch15: net-tools-1.60-ib-warning.patch # use instead of "mii.h" and fix Bug #491358 -Patch25: net-tools-1.60-mii-registers.patch - -# ifconfig interface:0 del will remove the Aliased IP on IA64 (#473211) -Patch26: net-tools-1.60-IA64.patch - -# fix memory leak in netstat when run with -c option -Patch27: net-tools-1.60-netstat-leak.patch +Patch16: net-tools-1.60-mii-registers.patch # Don't rely on eth0 being default network device name. # Since Fedora 15 network devices can have arbitrary names (#682367) -Patch28: net-tools-1.60-arbitrary-device-names.patch - -# plipconfig man page and usage output fixes. (#694766) -Patch29: net-tools-1.60-plipconfig.patch - -# netstat: remove part starting with colon in 'PID/Program name' column (#707427) -Patch30: net-tools-1.60-netstat-p-basename.patch - -# Possible problems found by static analysis of code. -Patch31: net-tools-1.60-coverity.patch +Patch17: net-tools-1.60-arbitrary-device-names.patch # Update for 2 digit Linux version numbers (#718610) -Patch32: net-tools-1.60-2digit.patch +Patch18: net-tools-1.60-2digit.patch BuildRequires: gettext, libselinux BuildRequires: libselinux-devel @@ -130,38 +88,24 @@ Most of them are obsolete. For replacement check iproute package. %prep %setup -q -c -%patch1 -p1 -b .isofix -%patch2 -p1 -b .cycle -%patch3 -p1 -b .ipx -%patch4 -p1 -b .inet6-lookup -%patch5 -p1 -b .man -%patch6 -p1 -b .interface -%patch7 -p1 -b .return -%patch8 -p1 -b .doubleword -%patch9 -p1 -b .bcast -%patch10 -p1 -b .dup-tcp -%patch11 -p1 -b .statalias -%patch12 -p1 -b .trim-iface -%patch13 -p1 -b .overflow -%patch14 -p1 -b .stack -%patch15 -p1 -b .selinux -%patch16 -p1 -b .fgets -%patch17 -p1 -b .x25 -%patch18 -p1 -b .sctp -%patch19 -p1 -b .long_iface -%patch20 -p1 -b .strncpy -%patch21 -p1 -b .clear-flag -%patch22 -p1 -b .probe -%patch23 -p1 -b .scanf-format -%patch24 -p1 -b .ib-warning -%patch25 -p1 -b .mii-registers -%patch26 -p1 -b .IA64 -%patch27 -p1 -b .netstat-leak -%patch28 -p1 -b .arbitrary-device-names -%patch29 -p1 -b .plipconfig -%patch30 -p1 -b .p-basename -%patch31 -p1 -b .coverity -%patch32 -p1 -b .2digit +%patch1 -p1 -b .cycle +%patch2 -p1 -b .ipx +%patch3 -p1 -b .inet6-lookup +%patch4 -p1 -b .man +%patch5 -p1 -b .interface +%patch6 -p1 -b .dup-tcp +%patch7 -p1 -b .statalias +%patch8 -p1 -b .trim-iface +%patch9 -p1 -b .stack +%patch10 -p1 -b .selinux +%patch11 -p1 -b .fgets +%patch12 -p1 -b .sctp +%patch13 -p1 -b .long_iface +%patch14 -p1 -b .probe +%patch15 -p1 -b .ib-warning +%patch16 -p1 -b .mii-registers +%patch17 -p1 -b .arbitrary-device-names +%patch18 -p1 -b .2digit cp %SOURCE1 ./config.h cp %SOURCE2 ./config.make @@ -219,6 +163,11 @@ mv man/pt_BR man/pt make BASEDIR=%{buildroot} mandir=%{_mandir} install +# ifconfig and route are installed into /bin by default +# mv them back to /sbin for now as I (jpopelka) don't think customers would be happy +mv %{buildroot}/bin/ifconfig %{buildroot}/sbin +mv %{buildroot}/bin/route %{buildroot}/sbin + install -m 755 ether-wake %{buildroot}/sbin install -m 755 mii-diag %{buildroot}/sbin @@ -228,7 +177,7 @@ rm %{buildroot}%{_mandir}/de/man8/rarp.8* rm %{buildroot}%{_mandir}/fr/man8/rarp.8* rm %{buildroot}%{_mandir}/pt/man8/rarp.8* -#remove hostname (has its own package) +# remove hostname (has its own package) rm %{buildroot}/bin/dnsdomainname rm %{buildroot}/bin/domainname rm %{buildroot}/bin/hostname @@ -255,7 +204,17 @@ fi %files -f %{name}.lang %doc COPYING /bin/netstat -/sbin/* +/sbin/ifconfig +/sbin/route +/sbin/arp +/sbin/ether-wake +/sbin/ipmaddr +/sbin/iptunnel +/sbin/mii-diag +/sbin/mii-tool +/sbin/nameif +/sbin/plipconfig +/sbin/slattach %{_mandir}/man[58]/* %lang(de) %{_mandir}/de/man[58]/* %lang(fr) %{_mandir}/fr/man[58]/* @@ -263,6 +222,12 @@ fi %attr(0644,root,root) %{_unitdir}/arp-ethers.service %changelog +* Thu Jan 05 2012 Jiri Popelka - 1.60-131.20120105git +- next 11 patches merged upstream +- removed bcast.patch (seems to be fixed upstream) +- removed netstat-p-basename.patch (upstream is not happy with it) +- netstat-leak.patch merged into duplicate-tcp.patch + * Wed Dec 07 2011 Jiri Popelka - 1.60-130.20111207git - removed virtualname.patch - added back isofix.patch diff --git a/sources b/sources index 635be2e..8617f48 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f1e09d6ce544f0a655da0566771e817d net-tools-1.60.20111207git.tar.xz +3a18ec81ad1350317e9ea7517b0c8ad2 net-tools-1.60.20120105git.tar.xz