chore(net-misc/iputils): move to portage-stable

This commit is contained in:
Brandon Philips 2013-02-16 10:06:59 -08:00
parent 1813578e88
commit 3e772fb37e
21 changed files with 0 additions and 1498 deletions

View File

@ -1,352 +0,0 @@
# ChangeLog for net-misc/iputils
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.87 2010/09/14 01:58:24 vapier Exp $
*iputils-20100418-r1 (14 Sep 2010)
14 Sep 2010; Mike Frysinger <vapier@gentoo.org> +iputils-20100418-r1.ebuild,
+files/iputils-20100418-arping-broadcast.patch:
Add fix for arping broadcast handling #337049 by Aleksander Machniak.
06 Sep 2010; Brent Baude <ranger@gentoo.org> iputils-20100418.ebuild:
Marking iputils-20100418 ppc64 for bug 332527
04 Sep 2010; Raúl Porcel <armin76@gentoo.org> iputils-20100418.ebuild:
alpha/arm/ia64/m68k/s390/sh/sparc stable wrt #332527
31 Aug 2010; Mike Frysinger <vapier@gentoo.org> iputils-20100418.ebuild,
+files/iputils-20100418-openssl.patch, +files/iputils-20100418-so_mark.patch:
Make openssl support optional #335436 by Jorge Manuel B. S. Vicetto. Fix
building with older linux headers #335347 by Mark Wagner.
30 Aug 2010; Jeroen Roovers <jer@gentoo.org> iputils-20100418.ebuild:
Stable for HPPA PPC (bug #332527).
29 Aug 2010; Markos Chandras <hwoarang@gentoo.org>
iputils-20100418.ebuild:
Stable on amd64 wrt bug #332527
28 Aug 2010; Pawel Hajdan jr <phajdan.jr@gentoo.org>
iputils-20100418.ebuild:
x86 stable wrt security bug #332527
22 Aug 2010; Luca Barbato <lu_zero@gentoo.org>
+files/iputils-20100418-proper-libs.patch, iputils-20100418.ebuild:
Fix cross compilation
14 Aug 2010; Diego E. Pettenò <flameeyes@gentoo.org>
iputils-20100418.ebuild:
Add missing dependency over sysfsutils (bug #332703, reported by Ryan
Hill, diagnosed by Lars Wendler).
*iputils-20100418 (14 Aug 2010)
14 Aug 2010; Mike Frysinger <vapier@gentoo.org> +iputils-20100418.ebuild,
+files/iputils-20100418-aliasing.patch,
+files/iputils-20100418-makefile.patch,
+files/iputils-20100418-ping-CVE-2010-2529.patch,
+files/iputils-20100418-printf-size.patch:
Version bump #306101 by Andrew Brouwers. Add fix for ping CVE-2010-2529
#332527 by Tim Sammut.
07 Jan 2010; Christian Faulhammer <fauli@gentoo.org>
iputils-20071127-r2.ebuild:
Transfer Prefix keywords
23 Aug 2009; Diego E. Pettenò <flameeyes@gentoo.org>
iputils-20070202.ebuild:
Drop to ~mips (for docbook cleanup).
*iputils-20071127-r2 (10 Jun 2008)
10 Jun 2008; <chainsaw@gentoo.org>
+files/iputils-20071127-nonroot-floodping.patch,
+iputils-20071127-r2.ebuild:
Introduce USE=SECURITY_HAZARD which allows non-root users to floodping.
This can be useful in some IXP/ISP environments where 10Gbit fibre links
have to be tested. As the name suggests, it should not be enabled unless
you know it makes sense for your situation.
*iputils-20071127-r1 (20 Apr 2008)
20 Apr 2008; Mike Frysinger <vapier@gentoo.org>
+files/iputils-20070202-idn.patch, +iputils-20071127-r1.ebuild:
Add support for USE=idn #218638 by Hanno Boeck.
20 Apr 2008; Mike Frysinger <vapier@gentoo.org> iputils-20071127.ebuild:
Mark amd64 stable.
31 Mar 2008; Sven Wegener <swegener@gentoo.org> iputils-20071127.ebuild:
Use mirror://gentoo/ for the manpages.
29 Mar 2008; Raúl Porcel <armin76@gentoo.org> iputils-20071127.ebuild:
alpha/ia64/sparc stable wrt #214734
29 Mar 2008; Jeroen Roovers <jer@gentoo.org> iputils-20071127.ebuild:
Stable for HPPA (bug #214734).
29 Mar 2008; Brent Baude <ranger@gentoo.org> ChangeLog:
Marking iputils-20071127 ppc for bug 214734
29 Mar 2008; Brent Baude <ranger@gentoo.org> iputils-20071127.ebuild:
stable ppc64, bug 214734
29 Mar 2008; Dawid Węgliński <cla@gentoo.org> iputils-20071127.ebuild:
Stable on x86 (bug #214734)
29 Mar 2008; Mike Frysinger <vapier@gentoo.org> iputils-20071127.ebuild:
Fixup manpage install.
28 Mar 2008; Brent Baude <ranger@gentoo.org> iputils-20071127.ebuild:
stable ppc, bug 214734
*iputils-20071127 (26 Jan 2008)
26 Jan 2008; Mike Frysinger <vapier@gentoo.org>
+files/iputils-20071127-gcc34.patch,
+files/iputils-20071127-kernel-ifaddr.patch, +iputils-20071127.ebuild:
Version bump #207289.
28 Oct 2007; Mike Frysinger <vapier@gentoo.org> iputils-20070202.ebuild:
Block net-misc/rarpd #197110 by kouyu.
21 Oct 2007; nixnut <nixnut@gentoo.org> iputils-20070202.ebuild:
Stable on ppc wrt bug 195915
19 Oct 2007; Raúl Porcel <armin76@gentoo.org> iputils-20070202.ebuild:
alpha/ia64/sparc stable wrt #195915
16 Oct 2007; Christoph Mende <angelos@gentoo.org> iputils-20070202.ebuild:
Stable on amd64 wrt bug #195915
16 Oct 2007; Markus Rothe <corsair@gentoo.org> iputils-20070202.ebuild:
Stable on ppc64; bug #195915
15 Oct 2007; Christian Faulhammer <opfer@gentoo.org>
iputils-20070202.ebuild:
stable x86, bug 195915
15 Oct 2007; Jeroen Roovers <jer@gentoo.org> iputils-20070202.ebuild:
Stable for HPPA (bug #195915).
15 Oct 2007; Mike Frysinger <vapier@gentoo.org>
+files/iputils-20070202-no-open-max.patch, iputils-20070202.ebuild:
Fix building with newer kernel headers that lack OPEN_MAX #195861 by Markus
Meier.
*iputils-99999999 (30 Apr 2007)
30 Apr 2007; Mike Frysinger <vapier@gentoo.org> +iputils-99999999.ebuild:
Live git version.
09 Feb 2007; Alexander H. Færøy <eroyf@gentoo.org>
iputils-20060512.ebuild:
Stable on MIPS; bug #165179
05 Feb 2007; Chris Gianelloni <wolf31o2@gentoo.org>
iputils-20060512.ebuild:
Stable on alpha wrt bug #165179.
05 Feb 2007; Jeroen Roovers <jer@gentoo.org> iputils-20060512.ebuild:
Stable for HPPA (bug #165179).
04 Feb 2007; Steve Dibb <beandog@gentoo.org> iputils-20060512.ebuild:
amd64 stable, bug 165179
04 Feb 2007; nixnut <nixnut@gentoo.org> iputils-20060512.ebuild:
Stable on ppc wrt bug 165179
04 Feb 2007; Markus Rothe <corsair@gentoo.org> iputils-20060512.ebuild:
Added ~ppc64; bug #165179
03 Feb 2007; Torsten Veller <tove@gentoo.org> iputils-20060512.ebuild:
Stable on x86 (#165179)
03 Feb 2007; Jason Wever <weeve@gentoo.org> iputils-20060512.ebuild:
Stable on SPARC wrt bug #165179.
*iputils-20070202 (03 Feb 2007)
03 Feb 2007; Mike Frysinger <vapier@gentoo.org>
+files/iputils-20070202-makefile.patch, +iputils-20070202.ebuild:
Version bump.
21 Dec 2006; Mike Frysinger <vapier@gentoo.org> iputils-20060512.ebuild:
Only generate man pages for USE=doc until next release where they include
man pages #158660.
*iputils-20060512 (20 Dec 2006)
20 Dec 2006; Mike Frysinger <vapier@gentoo.org>
+files/iputils-20060512-RFC3542.patch, +files/iputils-20060512-gcc4.patch,
+files/iputils-20060512-kernel-ifaddr.patch,
+files/iputils-20060512-linux-headers.patch,
+files/iputils-20060512-makefile.patch, +iputils-20060512.ebuild:
Version bump.
20 Aug 2006; Mike Frysinger <vapier@gentoo.org>
+files/iputils-021109-ipv6-updates.patch, iputils-021109-r3.ebuild:
Handle ipv6 define updates in newer kernels #134751 by Mekong.
08 Jun 2006; Mike Frysinger <vapier@gentoo.org>
+files/iputils-021109-gcc4.patch, iputils-021109-r3.ebuild:
Fixup a lot of incorrect type use.
06 May 2006; Mike Frysinger <vapier@gentoo.org> iputils-021109-r3.ebuild:
Generate a ping6.8 symlink to ping.8 as pointed out by Matej Stepanek #132010.
29 May 2005; <solar@gentoo.org> iputils-021109-r3.ebuild:
echangelog - update package to use libc expanded variable elibc_uclibc vs
uclibc so USE=-* works
02 May 2005; Mike Frysinger <vapier@gentoo.org>
+files/iputils-021109-bindnow.patch, -files/021109-gcc34.patch,
+files/iputils-021109-gcc34.patch, iputils-021109-r3.ebuild:
Update the gcc-inline patch by Dave Stahl #80969 and fix lazy bindings for
setuid apps #77526.
18 Jan 2005; Mike Frysinger <vapier@gentoo.org>
-files/iputils-021109-pfkey.patch, iputils-021109-r3.ebuild:
Punt setkey since ipsec-tools exists now to handle it #78588.
03 Jan 2005; Mike Frysinger <vapier@gentoo.org> iputils-021109-r3.ebuild:
Restore USE=doc with an extra check in case we're in the middle of a
bootstrap #23156.
03 Jan 2005; Mike Frysinger <vapier@gentoo.org> iputils-021109-r3.ebuild:
Make sure linux/ipsec.h is usuable before building ipsec stuff #67569.
03 Jan 2005; Mike Frysinger <vapier@gentoo.org>
+files/021109-ipg-linux-2.6.patch, iputils-021109-r3.ebuild:
Add support to ipg for newer kernels #71756 by Christoph M.
06 Oct 2004; Travis Tilley <lv@gentoo.org>
+files/iputils-021109-linux-udp-header.patch, iputils-021109-r3.ebuild:
fix compiling iputils using newer glibc snapshots
04 Aug 2004; Jon Portnoy <avenj@gentoo.org> iputils-021109-r3.ebuild :
Fix bison sed line. Bugs 59414 and 59191.
01 Jul 2004; Jon Hood <squinky86@gentoo.org> iputils-020927.ebuild,
iputils-021109-r3.ebuild:
virtual/glibc -> virtual/libc
28 Jun 2004; Brandon Hale <tseng@gentoo.org> iputils-021109-r3.ebuild:
Stable on x86.
15 Jun 2004; <solar@gentoo.org> iputils-021109-r3.ebuild,
files/iputils-20020927-no-ether_ntohost.patch:
added patch to allow iputils to compile with uclibc
14 Jun 2004; Aron Griffis <agriffis@gentoo.org> iputils-020927.ebuild:
Fix use invocation
*iputils-021109-r3 (24 Apr 2004)
24 Apr 2004; Mike Frysinger <vapier@gentoo.org> :
Remove racoon since (1) net-firewall/ipsec-tools installs this and
(2) the packaged racoon has a nice remote DoS #48847.
*iputils-021109-r2 (07 Apr 2004)
09 Apr 2004; Travis Tilley <lv@gentoo.org> iputils-021109-r1.ebuild:
marked stable on amd64
08 Apr 2004; Joshua Kinard <kumba@gentoo.org> iputils-020927.ebuild:
Typo fix
07 Apr 2004; Mike Frysinger <vapier@gentoo.org> :
Clean up src_unpack and src_compile steps and add flex/openssl to DEPEND #38774.
23 Mar 2004; Daniel Ahlberg <aliz@gentoo.org> iputils-021109-r1.ebuild:
Closing #44555.
01 Mar 2004; Tom Gall <tgall@gentoo.org> iputils-021109-r1.ebuild:
make sure ppc64 has yacc dependancy
16 Jan 2004; Bartosch Pixa <darkspecter@gentoo.org> :
set ppc in keywords
13 Jan 2004; Ned Ludd <solar@gentoo.org> iputils-021109-r1.ebuild:
Make ipv6 traceroute6, tracepath6 and ping6 made optional based on
ipv6 use flag. Prepare for x86 stable in the next day to two for
GRP release.
*iputils-021109-r1 (13 Jan 2004)
12 Jan 2004; Luca Barbato <lu_zero@gentoo.org> iputils-021109.ebuild:
Marked ppc to match the linux-headers changes
08 Jan 2004; <plasmaroo@gentoo.org> iputils-021109.ebuild:
Added 2.6 support; this now installs setkey and racoon if you have 2.6
headers.
*iputils-021109 (16 Nov 2003)
16 Nov 2003; Joshua Kinard <kumba@gentoo.org> iputils-021109.ebuild:
Version bump to a package that appears to be beta. It builds against 2.4.22+
linux-headers, however, so worth testing.
*iputils-020927 (03 Jan 2003)
21 Sep 2003; Mike Frysinger <vapier@gentoo.org> :
Add static support #29202.
12 Aug 2003; Jason Wever <weeve@gentoo.org> iputils-020927.ebuild:
Changed ~sparc keyword to sparc.
07 Jul 2003; Jan Seidel <tuxus@gentoo.org> iputils-020927.ebuild:
Mark stable on mips
01 Jul 2003; Luca Barbato <lu_zero@gentoo.org> iputils-020927.ebuild:
Mark stable on ppc
24 Jun 2003; Aron Griffis <agriffis@gentoo.org> iputils-020927.ebuild:
Mark stable on alpha
20 Jun 2003; Jon Portnoy <avenj@gentoo.org> iputils-020927.ebuild :
Temporarily yanked out all of the USE="doc" stuff until a more
permanent fix can be implemented. Was breaking emerge system for
users with doc in USE.
06 Apr 2003; Guy Martin <gmsoft@gentoo.org> iputils-020927.ebuild :
Marked stable on hppa. Changed depend sys-kernel/linux-headers to virtual/os-headers.
24 Feb 2003; Nicholas Wourms <dragon@gentoo.org> iputils-020927.ebuild :
Added testing mips keyword to the ebuild.
03 Jan 2003; Daniel Ahlberg <aliz@gentoo.org> iputils-020927.ebuild :
Version bump, found by Torgeir Hansen <torgeir@trenger.ro> in #13052.
Made use of "doc" use variable to decide whetever to depend on openjade to
compile and install documentation.
03 Jan 2003; Daniel Ahlberg <aliz@gentoo.org> iputils-020124-r1.ebuild :
Changed where the bins are installed. Also made ping and traceroute tools setuid.
Closes #10090.
06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords
*iputils-020124-r1 (16 Aug 2002)
06 Apr 2003; Guy Martin <gmsoft@gentoo.org> iputils-020124-r1.ebuild :
Changed depend sys-kernel/linux-headers to virtual/os-headers.
12 Feb 2003; Guy Martin <gmsoft@gentoo.org> iputils-020124-r1.ebuild :
Added hppa to keywords.
24 Feb 2003; Nicholas Wourms <dragon@gentoo.org> iputils-020124-r1.ebuild :
Added stable mips keyword to the ebuild.
16 Aug 2002; Matthew Turk <satai@gentoo.org> ChangeLog:
Updated by enabling documentation; recent changes in DocBook ebuilds have
fixed the outstanding issues.
*iputils-020124 (16 Jul 2002)
24 Feb 2003; Nicholas Wourms <dragon@gentoo.org> iputils-020124.ebuild :
Added stable mips keyword to the ebuild.
16 Jul 2002; Grant Goodyear <g2boojum@gentoo.org> ChangeLog :
new package

View File

@ -1,2 +0,0 @@
DIST iputils-s20100418-manpages.tar.bz2 21613 RMD160 cc42f88053c120f875b33c4f1567931b307aff85 SHA1 6522c2ccf713143de0fbc4e9d39497a2143a1713 SHA256 db42afbd393260cc72b53532b5812b35e377a38714e253fdcd7e2a6637b6a948
DIST iputils-s20100418.tar.bz2 94237 RMD160 64ea24bb57ae2b8d666b4bf5d35c2d37236882d5 SHA1 eb787a65341d7bced3458766f7094b08f02b712f SHA256 d0e8cbe6ce6a484ffb81697425b3b933746882f6f1521ac71c5c88971cee7684

View File

@ -1,24 +0,0 @@
--- iputils/rarpd.c.mps 2004-06-10 15:27:01.000000000 +0200
+++ iputils/rarpd.c 2004-06-10 15:26:29.000000000 +0200
@@ -42,7 +42,9 @@ int listen_arp;
char *ifname;
char *tftp_dir = "/etc/tftpboot";
+#ifndef __UCLIBC__
extern int ether_ntohost(char *name, unsigned char *ea);
+#endif
void usage(void) __attribute__((noreturn));
struct iflink
@@ -305,7 +307,11 @@ struct rarp_map *rarp_lookup(int ifindex
6,
};
+#ifndef __UCLIBC__
if (ether_ntohost(ename, lladdr) != 0 ||
+#else
+ if (
+#endif
(hp = gethostbyname(ename)) == NULL) {
if (verbose)
syslog(LOG_INFO, "not found in /etc/ethers");

View File

@ -1,10 +0,0 @@
--- rdisc.c
+++ rdisc.c
@@ -34,6 +34,7 @@
#include <sys/time.h>
/* Do not use "improved" glibc version! */
#include <linux/limits.h>
+#include <linux/types.h>
#include <sys/param.h>
#include <sys/socket.h>

View File

@ -1,158 +0,0 @@
sniped from Fedora and made to not suck
http://bugs.gentoo.org/218638
--- iputils-s20070202/Makefile
+++ iputils-s20070202/Makefile
@@ -22,6 +22,11 @@
all: $(TARGETS)
+ifeq ($(IDN),yes)
+CPPFLAGS += -DIDN
+ping: LDLIBS += -lidn
+ping6: LDLIBS += -lidn
+endif
tftpd: tftpd.o tftpsubs.o
ping: ping.o ping_common.o
--- iputils-s20070202/ping.c
+++ iputils-s20070202/ping.c
@@ -58,6 +58,11 @@
* This program has to run SUID to ROOT to access the ICMP socket.
*/
+#ifdef IDN
+#include <idna.h>
+#include <locale.h>
+#endif
+
#include "ping_common.h"
#include <netinet/ip.h>
@@ -122,6 +128,12 @@
char *target, hnamebuf[MAXHOSTNAMELEN];
char rspace[3 + 4 * NROUTES + 1]; /* record route space */
+#ifdef IDN
+ char *idn;
+ int rc = 0;
+ setlocale(LC_ALL, "");
+#endif
+
icmp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
socket_errno = errno;
@@ -242,13 +254,35 @@
if (argc == 1)
options |= F_NUMERIC;
} else {
+#ifdef IDN
+ rc = idna_to_ascii_lz (target, &idn, 0);
+ if (rc == IDNA_SUCCESS)
+ hp = gethostbyname (idn);
+ else {
+ fprintf(stderr, "ping: IDN encoding of '%s' failed with error code %d\n", target, rc);
+ exit(2);
+ }
+ free(idn);
+#else
hp = gethostbyname(target);
+#endif
if (!hp) {
fprintf(stderr, "ping: unknown host %s\n", target);
exit(2);
}
memcpy(&whereto.sin_addr, hp->h_addr, 4);
+#ifdef IDN
+ rc = idna_to_unicode_lzlz (hp->h_name, &idn, 0);
+ if (rc == IDNA_SUCCESS)
+ strncpy(hnamebuf, idn, sizeof(hnamebuf) - 1);
+ else {
+ fprintf(stderr, "ping: IDN encoding of '%s' failed with error code %d\n", hp->h_name, rc);
+ exit(2);
+ }
+ free(idn);
+#else
strncpy(hnamebuf, hp->h_name, sizeof(hnamebuf) - 1);
+#endif
hnamebuf[sizeof(hnamebuf) - 1] = 0;
hostname = hnamebuf;
}
--- iputils-s20070202/ping6.c
+++ iputils-s20070202/ping6.c
@@ -66,6 +66,13 @@
* More statistics could always be gathered.
* This program has to run SUID to ROOT to access the ICMP socket.
*/
+#ifdef IDN
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <locale.h>
+#endif
+
#include "ping_common.h"
#include <linux/filter.h>
@@ -210,6 +216,10 @@
int err, csum_offset, sz_opt;
static uint32_t scope_id = 0;
+#ifdef IDN
+ setlocale(LC_ALL, "");
+#endif
+
icmp_sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
socket_errno = errno;
@@ -296,6 +306,9 @@
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET6;
+#ifdef IDN
+ hints.ai_flags = AI_IDN;
+#endif
gai = getaddrinfo(target, NULL, &hints, &ai);
if (gai) {
fprintf(stderr, "unknown host\n");
@@ -328,6 +341,9 @@
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET6;
+#ifdef IDN
+ hints.ai_flags = AI_IDN;
+#endif
gai = getaddrinfo(target, NULL, &hints, &ai);
if (gai) {
fprintf(stderr, "unknown host\n");
--- iputils-s20070202/ping_common.c
+++ iputils-s20070202/ping_common.c
@@ -1,3 +1,7 @@
+#ifdef IDN
+#include <locale.h>
+#endif
+
#include "ping_common.h"
#include <ctype.h>
#include <sched.h>
@@ -97,6 +102,9 @@
void common_options(int ch)
{
+#ifdef IDN
+ setlocale(LC_ALL, "C");
+#endif
switch(ch) {
case 'a':
options |= F_AUDIBLE;
@@ -222,6 +230,9 @@
default:
abort();
}
+#ifdef IDN
+ setlocale(LC_ALL, "");
+#endif
}

View File

@ -1,35 +0,0 @@
--- Makefile
+++ Makefile
@@ -1,20 +1,17 @@
# Path to parent kernel include files directory
LIBC_INCLUDE=/usr/include
-DEFINES=
-
#options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
LDLIBS=-lresolv
-ADDLIB=
#options if you compile with libc5, and without a bind>=4.9.4 libresolv
# NOT AVAILABLE. Please, use libresolv.
-CC=gcc
# What a pity, all new gccs are buggy and -Werror does not work. Sigh.
#CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -Werror
-CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
-CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES)
+CFLAGS ?= -O2 -g
+CFLAGS += -Wstrict-prototypes -Wall
+CPPFLAGS += -D_GNU_SOURCE
IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
IPV6_TARGETS=tracepath6 traceroute6 ping6
@@ -35,7 +32,7 @@
rdisc_srv: rdisc_srv.o
rdisc_srv.o: rdisc.c
- $(CC) $(CFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
check-kernel:

View File

@ -1,16 +0,0 @@
the OPEN_MAX define has been removed in newer kernel headers so use the
proper method of getting the value dynamically
http://bugs.gentoo.org/195861
--- a/rdisc.c
+++ b/rdisc.c
@@ -247,7 +247,7 @@ void do_fork(void)
if ((pid=fork()) != 0)
exit(0);
- for (t = 0; t < OPEN_MAX; t++)
+ for (t = 0; t < sysconf(_SC_OPEN_MAX); t++)
if (t != s)
close(t);

View File

@ -1,134 +0,0 @@
iputils has a lot of ugly goto's that break when using
large gcc inline-limits.
Fixes by Robert Moss and Dave Stahl
http://bugs.gentoo.org/49241
http://bugs.gentoo.org/80969
--- iputils/tracepath.c
+++ iputils/tracepath.c
@@ -76,7 +76,7 @@
int progress = -1;
int broken_router;
-restart:
+ while (1) {
memset(&rcvbuf, -1, sizeof(rcvbuf));
iov.iov_base = &rcvbuf;
iov.iov_len = sizeof(rcvbuf);
@@ -93,7 +93,7 @@
if (res < 0) {
if (errno == EAGAIN)
return progress;
- goto restart;
+ continue;
}
progress = mtu;
@@ -216,7 +216,7 @@
perror("NET ERROR");
return 0;
}
- goto restart;
+ }
}
int probe_ttl(int fd, int ttl)
@@ -227,7 +227,6 @@
memset(sndbuf,0,mtu);
-restart:
for (i=0; i<10; i++) {
int res;
@@ -243,7 +242,8 @@
if (res==0)
return 0;
if (res > 0)
- goto restart;
+ i = 0;
+ continue;
}
hisptr = (hisptr + 1)&63;
--- iputils/tracepath6.c
+++ iputils/tracepath6.c
@@ -66,7 +66,7 @@
int progress = -1;
int broken_router;
-restart:
+ while (1) {
memset(&rcvbuf, -1, sizeof(rcvbuf));
iov.iov_base = &rcvbuf;
iov.iov_len = sizeof(rcvbuf);
@@ -83,7 +83,7 @@
if (res < 0) {
if (errno == EAGAIN)
return progress;
- goto restart;
+ continue;
}
progress = 2;
@@ -222,34 +222,29 @@
perror("NET ERROR");
return 0;
}
- goto restart;
+ }
}
int probe_ttl(int fd, int ttl)
{
- int i;
+ int i=0, res;
char sndbuf[mtu];
struct probehdr *hdr = (struct probehdr*)sndbuf;
-restart:
-
- for (i=0; i<10; i++) {
- int res;
-
- hdr->ttl = ttl;
- gettimeofday(&hdr->tv, NULL);
- if (send(fd, sndbuf, mtu-overhead, 0) > 0)
- break;
- res = recverr(fd, ttl);
- if (res==0)
- return 0;
- if (res > 0)
- goto restart;
- }
-
- if (i<10) {
- int res;
-
+ while (i<10) {
+ for (i=0; i<10; i++) {
+ hdr->ttl = ttl;
+ gettimeofday(&hdr->tv, NULL);
+ if (send(fd, sndbuf, mtu-overhead, 0) > 0)
+ break;
+ res = recverr(fd, ttl);
+ if (res==0)
+ return 0;
+ if (res > 0) {
+ i = 0;
+ continue;
+ }
+ }
data_wait(fd);
if (recv(fd, sndbuf, sizeof(sndbuf), MSG_DONTWAIT) > 0) {
printf("%2d?: reply received 8)\n", ttl);
@@ -257,7 +252,7 @@
}
res = recverr(fd, ttl);
if (res == 1)
- goto restart;
+ continue;
return res;
}

View File

@ -1,280 +0,0 @@
Otherwise same as Fedora patch except for the Makefile part
http://bugs.gentoo.org/show_bug.cgi?id=377687
http://pkgs.fedoraproject.org/gitweb/?p=iputils.git;a=blob_plain;f=iputils-20071127-infiniband.patch;hb=HEAD
--- arping.c
+++ arping.c
@@ -32,8 +32,6 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <sysfs/libsysfs.h>
-
#include "SNAPSHOT.h"
static void usage(void) __attribute__((noreturn));
@@ -52,14 +50,22 @@ int unicasting;
int s;
int broadcast_only;
-struct sockaddr_storage me;
-struct sockaddr_storage he;
+struct sockaddr_ll *me=NULL;
+struct sockaddr_ll *he=NULL;
struct timeval start, last;
int sent, brd_sent;
int received, brd_recv, req_recv;
+#define SYSFS_MNT_PATH "/sys"
+#define SYSFS_CLASS "class"
+#define SYSFS_NET "net"
+#define SYSFS_BROADCAST "broadcast"
+#define SYSFS_PATH_ENV "SYSFS_PATH"
+#define SYSFS_PATH_LEN 256
+#define SOCKADDR_LEN (2 * sizeof(struct sockaddr_ll))
+
#define MS_TDIFF(tv1,tv2) ( ((tv1).tv_sec-(tv2).tv_sec)*1000 + \
((tv1).tv_usec-(tv2).tv_usec)/1000 )
@@ -166,6 +172,10 @@ void finish(void)
printf("\n");
fflush(stdout);
}
+
+ free(me);
+ free(he);
+
if (dad)
exit(!!received);
if (unsolicited)
@@ -186,8 +196,7 @@ void catcher(void)
finish();
if (last.tv_sec==0 || MS_TDIFF(tv,last) > 500) {
- send_pack(s, src, dst,
- (struct sockaddr_ll *)&me, (struct sockaddr_ll *)&he);
+ send_pack(s, src, dst, me, he);
if (count == 0 && unsolicited)
finish();
}
@@ -234,7 +243,7 @@ int recv_pack(unsigned char *buf, int le
return 0;
if (ah->ar_pln != 4)
return 0;
- if (ah->ar_hln != ((struct sockaddr_ll *)&me)->sll_halen)
+ if (ah->ar_hln != me->sll_halen)
return 0;
if (len < sizeof(*ah) + 2*(4 + ah->ar_hln))
return 0;
@@ -245,7 +254,7 @@ int recv_pack(unsigned char *buf, int le
return 0;
if (src.s_addr != dst_ip.s_addr)
return 0;
- if (memcmp(p+ah->ar_hln+4, ((struct sockaddr_ll *)&me)->sll_addr, ah->ar_hln))
+ if (memcmp(p+ah->ar_hln+4, me->sll_addr, ah->ar_hln))
return 0;
} else {
/* DAD packet was:
@@ -263,7 +272,7 @@ int recv_pack(unsigned char *buf, int le
*/
if (src_ip.s_addr != dst.s_addr)
return 0;
- if (memcmp(p, ((struct sockaddr_ll *)&me)->sll_addr, ((struct sockaddr_ll *)&me)->sll_halen) == 0)
+ if (memcmp(p, me->sll_addr, me->sll_halen) == 0)
return 0;
if (src.s_addr && src.s_addr != dst_ip.s_addr)
return 0;
@@ -279,7 +288,7 @@ int recv_pack(unsigned char *buf, int le
printf("for %s ", inet_ntoa(dst_ip));
s_printed = 1;
}
- if (memcmp(p+ah->ar_hln+4, ((struct sockaddr_ll *)&me)->sll_addr, ah->ar_hln)) {
+ if (memcmp(p+ah->ar_hln+4, me->sll_addr, ah->ar_hln)) {
if (!s_printed)
printf("for ");
printf("[");
@@ -305,40 +314,67 @@ int recv_pack(unsigned char *buf, int le
if (quit_on_reply)
finish();
if(!broadcast_only) {
- memcpy(((struct sockaddr_ll *)&he)->sll_addr, p, ((struct sockaddr_ll *)&me)->sll_halen);
+ memcpy(he->sll_addr, p, me->sll_halen);
unicasting=1;
}
return 1;
}
-void set_device_broadcast(char *device, unsigned char *ba, size_t balen)
+int get_sysfs_mnt_path(char *mnt_path, size_t len)
{
- struct sysfs_class_device *dev;
- struct sysfs_attribute *brdcast;
- unsigned char *p;
- int ch;
+ const char *sysfs_path_env;
+ int pth_len=0;
- dev = sysfs_open_class_device("net", device);
- if (!dev) {
- perror("sysfs_open_class_device(net)");
- exit(2);
- }
+ if (len == 0 || mnt_path == NULL)
+ return -1;
- brdcast = sysfs_get_classdev_attr(dev, "broadcast");
- if (!brdcast) {
- perror("sysfs_get_classdev_attr(broadcast)");
- exit(2);
- }
+ /* possible overrride of real mount path */
+ sysfs_path_env = getenv(SYSFS_PATH_ENV);
+ memset(mnt_path, 0, len);
+ strncpy(mnt_path,
+ sysfs_path_env != NULL ? sysfs_path_env : SYSFS_MNT_PATH,
+ len-1);
- if (sysfs_read_attribute(brdcast)) {
- perror("sysfs_read_attribute");
- exit(2);
- }
+ if ((pth_len = strlen(mnt_path)) > 0 && mnt_path[pth_len-1] == '/')
+ mnt_path[pth_len-1] = '\0';
+
+ return 0;
+}
+
+int make_sysfs_broadcast_path(char *broadcast_path, size_t len)
+{
+ char mnt_path[SYSFS_PATH_LEN];
+
+ if (get_sysfs_mnt_path(mnt_path, len) != 0)
+ return -1;
- for (p = ba, ch = 0; p < ba + balen; p++, ch += 3)
- *p = strtoul(brdcast->value + ch, NULL, 16);
+ snprintf(broadcast_path, len,
+ "%s/" SYSFS_CLASS "/" SYSFS_NET "/%s/" SYSFS_BROADCAST,
+ mnt_path, device);
- return;
+ return 0;
+}
+
+char * read_sysfs_broadcast(char *brdcast_path)
+{
+ int fd;
+ int len_to_read;
+ char *brdcast = NULL;
+
+ if ((fd = open(brdcast_path, O_RDONLY)) > -1) {
+ len_to_read = lseek(fd, 0L, SEEK_END);
+ if ((brdcast = malloc(len_to_read+1)) != NULL) {
+ lseek(fd, 0L, SEEK_SET);
+ memset(brdcast, 0, len_to_read+1);
+ if (read(fd, brdcast, len_to_read) == -1) {
+ free(brdcast);
+ brdcast = NULL;
+ }
+ }
+ close(fd);
+ }
+
+ return brdcast;
}
int
@@ -356,6 +392,17 @@ main(int argc, char **argv)
exit(-1);
}
+ me = malloc(SOCKADDR_LEN);
+ if (!me) {
+ fprintf(stderr, "arping: could not allocate memory\n");
+ exit(1);
+ }
+ he = malloc(SOCKADDR_LEN);
+ if (!he) {
+ fprintf(stderr, "arping: could not allocate memory\n");
+ exit(1);
+ }
+
while ((ch = getopt(argc, argv, "h?bfDUAqc:w:s:I:V")) != EOF) {
switch(ch) {
case 'b':
@@ -504,34 +551,51 @@ main(int argc, char **argv)
close(probe_fd);
};
- ((struct sockaddr_ll *)&me)->sll_family = AF_PACKET;
- ((struct sockaddr_ll *)&me)->sll_ifindex = ifindex;
- ((struct sockaddr_ll *)&me)->sll_protocol = htons(ETH_P_ARP);
- if (bind(s, (struct sockaddr*)&me, sizeof(me)) == -1) {
+ me->sll_family = AF_PACKET;
+ me->sll_ifindex = ifindex;
+ me->sll_protocol = htons(ETH_P_ARP);
+ if (bind(s, (struct sockaddr*)me, SOCKADDR_LEN) == -1) {
perror("bind");
exit(2);
}
if (1) {
- socklen_t alen = sizeof(me);
- if (getsockname(s, (struct sockaddr*)&me, &alen) == -1) {
+ socklen_t alen = SOCKADDR_LEN;
+ if (getsockname(s, (struct sockaddr*)me, &alen) == -1) {
perror("getsockname");
exit(2);
}
}
- if (((struct sockaddr_ll *)&me)->sll_halen == 0) {
+ if (me->sll_halen == 0) {
if (!quiet)
printf("Interface \"%s\" is not ARPable (no ll address)\n", device);
exit(dad?0:2);
}
- he = me;
+ memcpy(he, me, SOCKADDR_LEN);
#if 1
- set_device_broadcast(device, ((struct sockaddr_ll *)&he)->sll_addr,
- ((struct sockaddr_ll *)&he)->sll_halen);
+ char brdcast_path[SYSFS_PATH_LEN];
+ char *brdcast_val=NULL;
+ char *next_ch;
+
+ if (make_sysfs_broadcast_path(brdcast_path, sizeof brdcast_path) != 0) {
+ perror("sysfs attribute broadcast");
+ exit(2);
+ }
+
+ if ((brdcast_val = read_sysfs_broadcast(brdcast_path)) == NULL) {
+ perror("sysfs read broadcast value");
+ exit(2);
+ }
+
+ for (ch=0; ch<he->sll_halen; ch++) {
+ he->sll_addr[ch] = strtol(brdcast_val + (ch*3), &next_ch, 16);
+ }
+
+ free(brdcast_val);
#else
- memset(((struct sockaddr_ll *)&he)->sll_addr, -1, ((struct sockaddr_ll *)&he)->sll_halen);
+ memset(he->sll_addr, -1, he->sll_halen);
#endif
if (!quiet) {
--- Makefile
+++ Makefile
@@ -28,7 +28,6 @@
ping6: LDLIBS += -lidn
endif
-arping: LDLIBS += -lsysfs
ping6: LDLIBS += -lresolv -lcrypto
tftpd: tftpd.o tftpsubs.o

View File

@ -1,55 +0,0 @@
--- rarpd.c
+++ rarpd.c
@@ -55,10 +55,10 @@ struct iflink
unsigned char lladdr[16];
char name[IFNAMSIZ];
- struct ifaddr *ifa_list;
+ struct kern_ifaddr *ifa_list;
} *ifl_list;
-struct ifaddr
+struct kern_ifaddr
{
- struct ifaddr *next;
+ struct kern_ifaddr *next;
__u32 prefix;
__u32 mask;
@@ -92,5 +92,5 @@ void load_if(void)
struct ifreq *ifrp, *ifend;
struct iflink *ifl;
- struct ifaddr *ifa;
+ struct kern_ifaddr *ifa;
struct ifconf ifc;
struct ifreq ibuf[256];
@@ -183,5 +183,5 @@ void load_if(void)
if (mask == 0 || prefix == 0)
continue;
- ifa = (struct ifaddr*)malloc(sizeof(*ifa));
+ ifa = (struct kern_ifaddr*)malloc(sizeof(*ifa));
memset(ifa, 0, sizeof(*ifa));
ifa->local = addr;
@@ -239,8 +239,8 @@ int bootable(__u32 addr)
}
-struct ifaddr *select_ipaddr(int ifindex, __u32 *sel_addr, __u32 **alist)
+struct kern_ifaddr *select_ipaddr(int ifindex, __u32 *sel_addr, __u32 **alist)
{
struct iflink *ifl;
- struct ifaddr *ifa;
+ struct kern_ifaddr *ifa;
int retry = 0;
int i;
@@ -298,5 +298,5 @@ struct rarp_map *rarp_lookup(int ifindex
if (r == NULL) {
if (hatype == ARPHRD_ETHER && halen == 6) {
- struct ifaddr *ifa;
+ struct kern_ifaddr *ifa;
struct hostent *hp;
char ename[256];
@@ -371,5 +371,5 @@ int put_myipaddr(unsigned char **ptr_p,
__u32 laddr = 0;
struct iflink *ifl;
- struct ifaddr *ifa;
+ struct kern_ifaddr *ifa;
for (ifl=ifl_list; ifl; ifl = ifl->next)

View File

@ -1,11 +0,0 @@
--- iputils-s20071127/ping_common.h.orig 2008-06-10 11:16:06.000000000 +0100
+++ iputils-s20071127/ping_common.h 2008-06-10 11:16:18.000000000 +0100
@@ -28,7 +28,7 @@
#define MAXWAIT 10 /* max seconds to wait for response */
#define MININTERVAL 10 /* Minimal interpacket gap */
-#define MINUSERINTERVAL 200 /* Minimal allowed interval for non-root */
+#define MINUSERINTERVAL 0 /* Minimal allowed interval for non-root */
#define SCHINT(a) (((a) <= MININTERVAL) ? MININTERVAL : (a))

View File

@ -1,93 +0,0 @@
From f36fbe8c85223def663f46499d0b6b9a75939aaa Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sat, 14 Aug 2010 01:34:13 -0400
Subject: [PATCH] fix up strict-aliasing warnings
Current build of some tools results in gcc warning about strict-aliasing
violations. So change those freaky casts to memcpy's. When the pointer
types work out, gcc will optimize this away anyways.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
ping6.c | 13 +++++++++----
tracepath.c | 2 +-
tracepath6.c | 2 +-
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/ping6.c b/ping6.c
index c5ff881..86f9216 100644
--- a/ping6.c
+++ b/ping6.c
@@ -1104,18 +1104,21 @@ int build_niquery(__u8 *_nih)
{
struct ni_hdr *nih;
int cc;
+ __u16 this_nonce;
nih = (struct ni_hdr *)_nih;
nih->ni_cksum = 0;
- CLR(ntohs((*(__u16*)(nih->ni_nonce))) % mx_dup_ck);
+ memcpy(&this_nonce, &nih->ni_nonce, sizeof(this_nonce));
+ CLR(ntohs(this_nonce) % mx_dup_ck);
nih->ni_type = ICMPV6_NI_QUERY;
cc = sizeof(*nih);
datalen = 0;
memcpy(nih->ni_nonce, ni_nonce, sizeof(nih->ni_nonce));
- *(__u16*)(nih->ni_nonce) = htons(ntransmitted + 1);
+ this_nonce = htons(ntransmitted + 1);
+ memcpy(&nih->ni_nonce, &this_nonce, sizeof(this_nonce));
nih->ni_code = ni_subject_type;
nih->ni_qtype = htons(ni_query);
@@ -1331,7 +1334,7 @@ parse_reply(struct msghdr *msg, int cc, void *addr, struct timeval *tv)
#endif
if (c->cmsg_len < CMSG_LEN(sizeof(int)))
continue;
- hops = *(int*)CMSG_DATA(c);
+ memcpy(&hops, CMSG_DATA(c), sizeof(int));
}
}
@@ -1355,7 +1358,9 @@ parse_reply(struct msghdr *msg, int cc, void *addr, struct timeval *tv)
return 0;
} else if (icmph->icmp6_type == ICMPV6_NI_REPLY) {
struct ni_hdr *nih = (struct ni_hdr *)icmph;
- __u16 seq = ntohs(*(__u16 *)nih->ni_nonce);
+ __u16 seq;
+ memcpy(&seq, &nih->ni_nonce, sizeof(seq));
+ seq = ntohs(seq);
if (memcmp(&nih->ni_nonce[2], &ni_nonce[2], sizeof(ni_nonce) - sizeof(__u16)))
return 1;
if (gather_statistics((__u8*)icmph, sizeof(*icmph), cc,
diff --git a/tracepath.c b/tracepath.c
index ca84a69..0a14b1b 100644
--- a/tracepath.c
+++ b/tracepath.c
@@ -142,7 +142,7 @@ restart:
if (cmsg->cmsg_type == IP_RECVERR) {
e = (struct sock_extended_err *) CMSG_DATA(cmsg);
} else if (cmsg->cmsg_type == IP_TTL) {
- rethops = *(int*)CMSG_DATA(cmsg);
+ memcpy(&rethops, CMSG_DATA(cmsg), sizeof(int));
} else {
printf("cmsg:%d\n ", cmsg->cmsg_type);
}
diff --git a/tracepath6.c b/tracepath6.c
index 5c2db8f..77a3563 100644
--- a/tracepath6.c
+++ b/tracepath6.c
@@ -170,7 +170,7 @@ restart:
#ifdef IPV6_2292HOPLIMIT
case IPV6_2292HOPLIMIT:
#endif
- rethops = *(int*)CMSG_DATA(cmsg);
+ memcpy(&rethops, CMSG_DATA(cmsg), sizeof(int));
break;
default:
printf("cmsg6:%d\n ", cmsg->cmsg_type);
--
1.7.1.1

View File

@ -1,50 +0,0 @@
http://bugs.gentoo.org/337049
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=585591
From: Jesper Dangaard Brouer <hawk@comx.dk>
Subject: [PATCH] iputils: arping fails to set correct broadcast address
From: Paul Martin <pm@debian.org>
There seems to have been introduced a bug in iputils release s20100418.
This patch is based upon git://www.linux-ipv6.org/gitroot/iputils.git
(git commit fe342ca3148)
The regression is caused by commit 56018bf1b3
arping: Support link-layer type with larger link-layer address.
As reported by: Paul Martin <pm@debian.org> in Debian bugreport #585591.
There's a logic error in the function that parses the interface's
broadcast address, causing it not to fill the broadcast address array
correctly.
Please apply.
Reported-by: Paul Martin <pm@debian.org>
Tested-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
---
arping.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arping.c b/arping.c
index 9bd6927..2613a12 100644
--- a/arping.c
+++ b/arping.c
@@ -336,7 +336,7 @@ void set_device_broadcast(char *device, unsigned char *ba, size_t balen)
}
for (p = ba, ch = 0; p < ba + balen; p++, ch += 3)
- *p++ = strtoul(brdcast->value + ch * 3, NULL, 16);
+ *p = strtoul(brdcast->value + ch, NULL, 16);
return;
}

View File

@ -1,35 +0,0 @@
--- Makefile
+++ Makefile
@@ -1,20 +1,17 @@
# Path to parent kernel include files directory
LIBC_INCLUDE=/usr/include
-DEFINES=
-
#options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
LDLIBS=
-ADDLIB=
#options if you compile with libc5, and without a bind>=4.9.4 libresolv
# NOT AVAILABLE. Please, use libresolv.
-CC=gcc
# What a pity, all new gccs are buggy and -Werror does not work. Sigh.
#CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -Werror
-CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
-CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES)
+CFLAGS ?= -O2 -g
+CFLAGS += -Wstrict-prototypes -Wall
+CPPFLAGS += -D_GNU_SOURCE
IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
IPV6_TARGETS=tracepath6 traceroute6 ping6
@@ -35,7 +32,7 @@
rdisc_srv: rdisc_srv.o
rdisc_srv.o: rdisc.c
- $(CC) $(CFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
check-kernel:

View File

@ -1,35 +0,0 @@
make openssl optional
https://bugs.gentoo.org/335436
--- ping6.c
+++ ping6.c
@@ -161,7 +161,9 @@
static int icmp_sock;
+#ifdef HAVE_OPENSSL
#include <openssl/md5.h>
+#endif
/* Node Information query */
int ni_query = -1;
@@ -478,6 +480,7 @@
char *ni_groupaddr(const char *name)
{
+#ifdef HAVE_OPENSSL
MD5_CTX ctxt;
__u8 digest[16];
static char nigroup_buf[INET6_ADDRSTRLEN + 1 + IFNAMSIZ];
@@ -518,6 +521,10 @@
if (q)
strcat(nigroup_buf, q);
return nigroup_buf;
+#else
+ fprintf(stderr, "ping6: function not available; openssl disabled\n");
+ exit(1);
+#endif
}
int main(int argc, char *argv[])

View File

@ -1,22 +0,0 @@
https://bugs.gentoo.org/332527
--- iputils-s20100418/ping.c
+++ iputils-s20100418/ping.c
@@ -1083,7 +1083,7 @@ void pr_options(unsigned char * cp, int
i = j;
i -= IPOPT_MINOFF;
if (i <= 0)
- continue;
+ break;
if (i == old_rrlen
&& !strncmp((char *)cp, old_rr, i)
&& !(options & F_FLOOD)) {
@@ -1120,7 +1120,7 @@ void pr_options(unsigned char * cp, int
i = j;
i -= 5;
if (i <= 0)
- continue;
+ break;
flags = *++cp;
printf("\nTS: ");
cp++;

View File

@ -1,62 +0,0 @@
From 6ccd3b91c18d8b13bc468ef962a9ef9dfc6c4515 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sat, 14 Aug 2010 01:16:42 -0400
Subject: [PATCH] tracepath: re-use printf return in print_host
The printf funcs take an int for field widths, not a size_t. Also, since
the printf funcs already return the length of chars displayed, use that
value instead of re-calculating the length with strlen.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
tracepath.c | 11 ++++-------
tracepath6.c | 11 ++++-------
2 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/tracepath.c b/tracepath.c
index 81c22e9..ca84a69 100644
--- a/tracepath.c
+++ b/tracepath.c
@@ -68,13 +68,10 @@ void data_wait(int fd)
void print_host(const char *a, const char *b, int both)
{
- size_t plen = 0;
- printf("%s", a);
- plen = strlen(a);
- if (both) {
- printf(" (%s)", b);
- plen += strlen(b) + 3;
- }
+ int plen;
+ plen = printf("%s", a);
+ if (both)
+ plen += printf(" (%s)", b);
if (plen >= HOST_COLUMN_SIZE)
plen = HOST_COLUMN_SIZE - 1;
printf("%*s", HOST_COLUMN_SIZE - plen, "");
diff --git a/tracepath6.c b/tracepath6.c
index 5cc7424..5c2db8f 100644
--- a/tracepath6.c
+++ b/tracepath6.c
@@ -80,13 +80,10 @@ void data_wait(int fd)
void print_host(const char *a, const char *b, int both)
{
- size_t plen = 0;
- printf("%s", a);
- plen = strlen(a);
- if (both) {
- printf(" (%s)", b);
- plen += strlen(b) + 3;
- }
+ int plen;
+ plen = printf("%s", a);
+ if (both)
+ plen += printf(" (%s)", b);
if (plen >= HOST_COLUMN_SIZE)
plen = HOST_COLUMN_SIZE - 1;
printf("%*s", HOST_COLUMN_SIZE - plen, "");
--
1.7.1.1

View File

@ -1,20 +0,0 @@
http://bugs.gentoo.org/332703
--- Makefile
+++ Makefile
@@ -28,10 +28,13 @@
ping6: LDLIBS += -lidn
endif
+arping: LDLIBS += -lsysfs
+ping6: LDLIBS += -lresolv -lcrypto
+
tftpd: tftpd.o tftpsubs.o
-arping: arping.o -lsysfs
+arping: arping.o
ping: ping.o ping_common.o
-ping6: ping6.o ping_common.o -lresolv -lcrypto
+ping6: ping6.o ping_common.o
ping.o ping6.o ping_common.o: ping_common.h
tftpd.o tftpsubs.o: tftp.h

View File

@ -1,22 +0,0 @@
https://bugs.gentoo.org/335347
fix building with older linux headers that don't define SO_MARK
--- ping_common.c
+++ ping_common.c
@@ -485,6 +485,7 @@
fprintf(stderr, "Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP\n");
}
#endif
+#ifdef SO_MARK
if (options & F_MARK) {
if (setsockopt(icmp_sock, SOL_SOCKET, SO_MARK,
&mark, sizeof(mark)) == -1) {
@@ -494,6 +495,7 @@
fprintf(stderr, "Warning: Failed to set mark %d\n", mark);
}
}
+#endif
/* Set some SNDTIMEO to prevent blocking forever
* on sends, when device is too slow or stalls. Just put limit

View File

@ -1,74 +0,0 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-20100418-r1.ebuild,v 1.1 2010/09/14 01:58:24 vapier Exp $
inherit flag-o-matic eutils toolchain-funcs
DESCRIPTION="Network monitoring tools including ping and ping6"
HOMEPAGE="http://www.linux-foundation.org/en/Net:Iputils"
SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2
mirror://gentoo/iputils-s${PV}-manpages.tar.bz2"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-linux ~x86-linux"
IUSE="doc extras idn ipv6 SECURITY_HAZARD ssl static"
RDEPEND="extras? ( !net-misc/rarpd )
ssl? ( dev-libs/openssl )
idn? ( net-dns/libidn )"
DEPEND="${RDEPEND}
virtual/os-headers"
S=${WORKDIR}/${PN}-s${PV}
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch
epatch "${FILESDIR}"/${PN}-20100418-arping-broadcast.patch #337049
epatch "${FILESDIR}"/${PN}-20100418-openssl.patch #335436
epatch "${FILESDIR}"/${PN}-20100418-so_mark.patch #335347
epatch "${FILESDIR}"/${PN}-20100418-makefile.patch
epatch "${FILESDIR}"/${PN}-20100418-proper-libs.patch #332703
epatch "${FILESDIR}"/${PN}-20100418-printf-size.patch
epatch "${FILESDIR}"/${PN}-20100418-aliasing.patch
epatch "${FILESDIR}"/${PN}-20071127-kernel-ifaddr.patch
epatch "${FILESDIR}"/${PN}-20070202-idn.patch #218638
epatch "${FILESDIR}"/${PN}-20100418-ping-CVE-2010-2529.patch #332527
epatch "${FILESDIR}"/${PN}-20071127-infiniband.patch #377687
use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch
use static && append-ldflags -static
use ssl && append-cppflags -DHAVE_OPENSSL
use ipv6 || sed -i -e 's:IPV6_TARGETS=:#IPV6_TARGETS=:' Makefile
export IDN=$(use idn && echo yes)
}
src_compile() {
tc-export CC
emake || die "make main failed"
}
src_install() {
into /
dobin ping || die "ping"
use ipv6 && dobin ping6
dosbin arping || die "arping"
into /usr
dosbin tracepath || die "tracepath"
use ipv6 && dosbin trace{path,route}6
use extras && \
{ dosbin clockdiff rarpd rdisc ipg tftpd || die "misc sbin"; }
fperms 4711 /bin/ping
use ipv6 && fperms 4711 /bin/ping6 /usr/sbin/traceroute6
dodoc INSTALL RELNOTES
use ipv6 \
&& dosym ping.8 /usr/share/man/man8/ping6.8 \
|| rm -f doc/*6.8
rm -f doc/setkey.8
doman doc/*.8
use doc && dohtml doc/*.html
}

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>base-system</herd>
<use>
<flag name="SECURITY_HAZARD">Allow non-root users to flood (ping -f). This is generally a very bad idea.</flag>
</use>
</pkgmetadata>