From 679e855206798435f8b168db6426e283e1f70a12 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Mon, 6 Aug 2012 21:45:11 -0500 Subject: iputils 20101006 --- abs/core/iputils/PKGBUILD | 108 +- .../iputils-20101006-ping-integer-overflow.patch | 11 + abs/core/iputils/iputils-big-patches.patch | 595 ---------- abs/core/iputils/iputils-ss021109-try.patch | 239 ---- abs/core/iputils/iputils.install | 11 + abs/core/iputils/iputils.patch | 1170 -------------------- abs/core/iputils/permission-fix.patch | 15 - abs/core/iputils/protocols | 18 - abs/core/iputils/services | 195 ---- abs/core/iputils/tftp.xinetd | 10 + 10 files changed, 91 insertions(+), 2281 deletions(-) create mode 100644 abs/core/iputils/iputils-20101006-ping-integer-overflow.patch delete mode 100644 abs/core/iputils/iputils-big-patches.patch delete mode 100644 abs/core/iputils/iputils-ss021109-try.patch create mode 100644 abs/core/iputils/iputils.install delete mode 100644 abs/core/iputils/iputils.patch delete mode 100644 abs/core/iputils/permission-fix.patch delete mode 100644 abs/core/iputils/protocols delete mode 100644 abs/core/iputils/services create mode 100644 abs/core/iputils/tftp.xinetd diff --git a/abs/core/iputils/PKGBUILD b/abs/core/iputils/PKGBUILD index 1b62cda..e72795d 100644 --- a/abs/core/iputils/PKGBUILD +++ b/abs/core/iputils/PKGBUILD @@ -1,61 +1,71 @@ -# $Id: PKGBUILD 82625 2010-06-15 04:22:56Z allan $ -# Maintainer: Aaron Griffin +# $Id: PKGBUILD 163489 2012-07-13 11:24:04Z stephane $ +# Maintainer: Stéphane Gaudreault +# Maintainer: Tobias Powalowski +# Contributor: Aaron Griffin pkgname=iputils -pkgver=20100214 -_traceroutever=1.4a12 -pkgrel=2 +pkgver=20101006 +pkgrel=4 pkgdesc="IP Configuration Utilities (and Ping)" -arch=(i686 x86_64) +arch=('i686' 'x86_64') license=('GPL') url="http://www.linuxfoundation.org/en/Net:Iputils" groups=('base') -depends=('glibc') -makedepends=('opensp' 'libxslt' 'docbook-xsl') -conflicts=('netkit-base' 'arping' 'netkit-tftpd' 'traceroute') -replaces=('netkit-base' 'traceroute') -source=(http://www.skbuff.net/iputils/$pkgname-s$pkgver.tar.bz2 - ftp://ftp.ee.lbl.gov/traceroute-$_traceroutever.tar.gz - permission-fix.patch) -options=(!makeflags) -md5sums=('37596c8b3eed537294e77464b9804726' - '964d599ef696efccdeebe7721cd4828d' - '66109966cad06e425bb12a78bab85b70') - -build() -{ - #build iptuils - cd $srcdir/$pkgname-s$pkgver - make KERNEL_INCLUDE=/usr/include || return 1 # for i686 - for i in arping clockdiff rarpd rdisc tftpd tracepath tracepath6; do - install -D -m755 $i $pkgdir/usr/sbin/$i - done - for i in ping ping6 traceroute6; do - install -D -m4755 $i $pkgdir/bin/$i - done +depends=('openssl' 'sysfsutils' 'libcap') +optdepends=('xinetd: for tftpd') +makedepends=('docbook2x' 'opensp') +conflicts=('netkit-base' 'arping' 'netkit-tftpd') +replaces=('netkit-base') +backup=(etc/xinetd.d/tftp) +install=${pkgname}.install +source=(http://www.skbuff.net/${pkgname}/${pkgname}-s${pkgver}.tar.bz2 tftp.xinetd + iputils-20101006-ping-integer-overflow.patch) +sha1sums=('a08cc5423a7bf940205f2353fe3d129cd39ff242' + 'fc2ae26f5609725e3f4aeaf4ab82dfa6d2e378fd' + 'ec78574d798b53e4f8bdd37e42514fc17ed71667') + +build() { + cd "${srcdir}/${pkgname}-s${pkgver}" + + # Use our CFLAGS + sed -i -e "/^CCOPT=/s|-O2|${CFLAGS}|" Makefile + + # FS#28897 + patch -Np1 -i ../iputils-20101006-ping-integer-overflow.patch + + make - msg ":: building docs" - # good god, these docs are a pain - # special thanks to Michael(tm) Smith - http://people.w3.org/mike/ - # from #docbook on freenode.org for figuring this out cd doc for file in *.sgml; do - xf=${file/.sgml/.xml} - osx -xlower -xno-nl-in-tag $file > $xf || true - sed -i "s|\(.*\), \(.*\)|\1, \2|g" $xf - xsltproc /usr/share/xml/docbook/xsl-stylesheets-1.76.0/manpages/docbook.xsl $xf + xf=${file/.sgml/.xml} + osx -xlower -xno-nl-in-tag $file > $xf || true + sed -i "s|\(.*\), \(.*\)|\1, \2|g" $xf + docbook2man $xf done +} - mkdir -p $pkgdir/usr/share/man/man8 - install -m644 arping.8 clockdiff.8 ping.8 ping6.8 rarpd.8 rdisc.8 \ - tftpd.8 tracepath.8 tracepath6.8 traceroute6.8 \ - $pkgdir/usr/share/man/man8/ - - # build traceroute - # this is combined in this package because it's awkward as a separate package - cd ${srcdir}/traceroute-$_traceroutever - patch -Np1 -i ../permission-fix.patch || return 1 - ./configure --prefix=/usr --sbindir=/bin --mandir=/usr/share/man - make CFLAGS="${CFLAGS} -Ilinux-include/" || return 1 - make DESTDIR=${pkgdir} install install-man +package() { + cd "${srcdir}/${pkgname}-s${pkgver}" + + install -dm755 "${pkgdir}"/usr/{bin,sbin} "${pkgdir}"/bin + + install -m755 arping clockdiff rarpd rdisc tftpd tracepath tracepath6 \ + "${pkgdir}"/usr/sbin/ + + install -m755 ping{,6} "${pkgdir}"/usr/bin/ + ln -sf /usr/bin/ping{,6} "${pkgdir}"/bin/ + + install -dm755 "${pkgdir}"/usr/share/man/man8 + install -m644 doc/{arping,clockdiff,ping,rarpd,rdisc,tftpd,tracepath}.8 \ + "${pkgdir}"/usr/share/man/man8/ + + cd "${pkgdir}"/usr/share/man/man8 + ln -sf ping.8.gz ping6.8.gz + ln -sf tracepath.8.gz tracepath6.8.gz + + # FS#24768 + install -dm755 "${pkgdir}"/etc/xinetd.d/ + install -m644 "${srcdir}"/tftp.xinetd "${pkgdir}"/etc/xinetd.d/tftp } + +# vim:set ts=2 sw=2 et: diff --git a/abs/core/iputils/iputils-20101006-ping-integer-overflow.patch b/abs/core/iputils/iputils-20101006-ping-integer-overflow.patch new file mode 100644 index 0000000..720e5e8 --- /dev/null +++ b/abs/core/iputils/iputils-20101006-ping-integer-overflow.patch @@ -0,0 +1,11 @@ +--- iputils-s20101006/ping_common.c 2010-10-06 13:59:20.000000000 +0200 ++++ iputils-s20101006-patched/ping_common.c 2012-03-09 16:42:46.878151032 +0100 +@@ -590,7 +590,7 @@ + + /* If we are here, recvmsg() is unable to wait for + * required timeout. */ +- if (1000*next <= 1000000/(int)HZ) { ++ if (((uint64_t)1000*next) <= (uint64_t)1000000/(int)HZ) { + /* Very short timeout... So, if we wait for + * something, we sleep for MININTERVAL. + * Otherwise, spin! */ diff --git a/abs/core/iputils/iputils-big-patches.patch b/abs/core/iputils/iputils-big-patches.patch deleted file mode 100644 index 29bc310..0000000 --- a/abs/core/iputils/iputils-big-patches.patch +++ /dev/null @@ -1,595 +0,0 @@ -diff -Naur iputils.orig/Makefile iputils/Makefile ---- iputils.orig/Makefile 2002-11-09 03:01:11.000000000 +0000 -+++ iputils/Makefile 2005-06-09 16:15:32.000000000 +0000 -@@ -17,11 +17,6 @@ - GLIBCFIX=-Iinclude-glibc -include include-glibc/glibc-bugs.h - endif - --ifeq ($(KERNEL_INCLUDE)/linux/pfkeyv2.h,$(wildcard $(KERNEL_INCLUDE)/linux/pfkeyv2.h)) -- SUBDIRS=libipsec setkey -- LDLIBS+=-Llibipsec -lipsec -- IPSECDEF=-DDO_IPSEC -Ilibipsec --endif - - - #options if you compile with libc5, and without a bind>=4.9.4 libresolv -@@ -31,7 +26,7 @@ - # 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) -I$(KERNEL_INCLUDE) -I../include $(IPSECDEF) $(DEFINES) -+CFLAGS=$(CCOPT) -I../include $(IPSECDEF) $(DEFINES) - - IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd - IPV6_TARGETS=tracepath6 traceroute6 ping6 -@@ -42,7 +37,11 @@ - - tftpd: tftpd.o tftpsubs.o - ping: ping.o ping_common.o -+ $(LINK.o) $^ $(LDLIBS) -o $@ -Wl,-z,now -Wl,-z,relro - ping6: ping6.o ping_common.o -+ $(LINK.o) $^ $(LDLIBS) -o $@ -Wl,-z,now -Wl,-z,relro -+traceroute6: traceroute6.o -+ $(LINK.o) $^ $(LDLIBS) -o $@ -Wl,-z,now -Wl,-z,relro - ping.o ping6.o ping_common.o: ping_common.h - tftpd.o tftpsubs.o: tftp.h - -diff -Naur iputils.orig/arping.c iputils/arping.c ---- iputils.orig/arping.c 2001-10-05 22:42:47.000000000 +0000 -+++ iputils/arping.c 2005-06-09 16:15:24.000000000 +0000 -@@ -9,6 +9,7 @@ - * Authors: Alexey Kuznetsov, - */ - -+#include - #include - #include - #include -@@ -19,6 +20,8 @@ - #include - #include - #include -+#include -+#include - #include - - #include -diff -Naur iputils.orig/clockdiff.c iputils/clockdiff.c ---- iputils.orig/clockdiff.c 2002-02-23 00:10:59.000000000 +0000 -+++ iputils/clockdiff.c 2005-06-09 16:15:24.000000000 +0000 -@@ -1,7 +1,9 @@ -+#include - #include - #include - #include - #include -+#include - #include - #include - #include -diff -Naur iputils.orig/include-glibc/netinet/in.h iputils/include-glibc/netinet/in.h ---- iputils.orig/include-glibc/netinet/in.h 2002-11-09 00:22:25.000000000 +0000 -+++ iputils/include-glibc/netinet/in.h 2005-06-09 16:15:00.000000000 +0000 -@@ -65,4 +65,45 @@ - && (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3])) - - --#endif /* netinet/in.h */ -+/* Functions to convert between host and network byte order. -+ -+ Please note that these functions normally take `unsigned long int' or -+ `unsigned short int' values as arguments and also return them. But -+ this was a short-sighted decision since on different systems the types -+ may have different representations but the values are always the same. */ -+ -+extern u_int32_t ntohl (u_int32_t __netlong) __THROW __attribute__ ((__const__)); -+extern u_int16_t ntohs (u_int16_t __netshort) -+ __THROW __attribute__ ((__const__)); -+extern u_int32_t htonl (u_int32_t __hostlong) -+ __THROW __attribute__ ((__const__)); -+extern u_int16_t htons (u_int16_t __hostshort) -+ __THROW __attribute__ ((__const__)); -+ -+#include -+ -+/* Get machine dependent optimized versions of byte swapping functions. */ -+#include -+ -+#ifdef __OPTIMIZE__ -+/* We can optimize calls to the conversion functions. Either nothing has -+ to be done or we are using directly the byte-swapping functions which -+ often can be inlined. */ -+# if __BYTE_ORDER == __BIG_ENDIAN -+/* The host byte order is the same as network byte order, -+ so these functions are all just identity. */ -+# define ntohl(x) (x) -+# define ntohs(x) (x) -+# define htonl(x) (x) -+# define htons(x) (x) -+# else -+# if __BYTE_ORDER == __LITTLE_ENDIAN -+# define ntohl(x) __bswap_32 (x) -+# define ntohs(x) __bswap_16 (x) -+# define htonl(x) __bswap_32 (x) -+# define htons(x) __bswap_16 (x) -+# endif -+# endif -+#endif -+ -+#endif /* netinet/in.h */ -diff -Naur iputils.orig/ipg iputils/ipg ---- iputils.orig/ipg 2001-08-02 22:37:32.000000000 +0000 -+++ iputils/ipg 2005-06-09 16:14:49.000000000 +0000 -@@ -1,21 +1,31 @@ --#! /bin/bash -+#!/bin/bash - --modprobe pg3 -+modprobe pg3 >& /dev/null -+modprobe pktgen >& /dev/null -+ -+PGDEV=/proc/net/pg -+if [[ ! -e ${PGDEV} ]] ; then -+ PGDEV=/proc/net/pktgen/pg0 -+ if [[ ! -e ${PGDEV} ]] ; then -+ echo "Couldn't not locate pg in /proc/net :(" -+ exit 1 -+ fi -+fi - - function pgset() { - local result - -- echo $1 > /proc/net/pg -+ echo $1 > ${PGDEV} - -- result=`cat /proc/net/pg | fgrep "Result: OK:"` -+ result=`cat ${PGDEV} | fgrep "Result: OK:"` - if [ "$result" = "" ]; then -- cat /proc/net/pg | fgrep Result: -+ cat ${PGDEV} | fgrep Result: - fi - } - - function pg() { -- echo inject > /proc/net/pg -- cat /proc/net/pg -+ echo inject > ${PGDEV} -+ cat ${PGDEV} - } - - pgset "odev eth0" -diff -Naur iputils.orig/ping.c iputils/ping.c ---- iputils.orig/ping.c 2002-11-07 22:53:21.000000000 +0000 -+++ iputils/ping.c 2005-06-09 16:15:00.000000000 +0000 -@@ -60,8 +60,8 @@ - - #include "ping_common.h" - -+#include - #include --#include - #ifdef DO_IPSEC - #include - #endif -@@ -1213,7 +1213,7 @@ - once = 1; - - /* Patch bpflet for current identifier. */ -- insns[2] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __constant_htons(ident), 0, 1); -+ insns[2] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, htons(ident), 0, 1); - - if (setsockopt(icmp_sock, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter))) - perror("WARNING: failed to install socket filter\n"); -diff -Naur iputils.orig/ping6.c iputils/ping6.c ---- iputils.orig/ping6.c 2002-09-20 15:08:11.000000000 +0000 -+++ iputils/ping6.c 2005-06-09 16:15:00.000000000 +0000 -@@ -68,8 +68,44 @@ - */ - #include "ping_common.h" - --#include --#include -+struct ipv6_rt_hdr { -+ __u8 nexthdr; -+ __u8 hdrlen; -+ __u8 type; -+ __u8 segments_left; -+ -+ /* -+ * type specific data -+ * variable length field -+ */ -+}; -+ -+struct rt0_hdr { -+ struct ipv6_rt_hdr rt_hdr; -+ __u32 bitmap; /* strict/loose bit map */ -+ struct in6_addr addr[0]; -+ -+#define rt0_type rt_hdr.type; -+}; -+#define IPV6_SRCRT_TYPE_0 0 /* IPv6 type 0 Routing Header */ -+struct ipv6hdr { -+#if defined(__LITTLE_ENDIAN) -+ __u8 priority:4, -+ version:4; -+#elif defined(__BIG_ENDIAN) -+ __u8 version:4, -+ priority:4; -+#endif -+ __u8 flow_lbl[3]; -+ -+ __u16 payload_len; -+ __u8 nexthdr; -+ __u8 hop_limit; -+ -+ struct in6_addr saddr; -+ struct in6_addr daddr; -+}; -+ - #include - - #define BIT_CLEAR(nr, addr) do { ((__u32 *)(addr))[(nr) >> 5] &= ~(1U << ((nr) & 31)); } while(0) -@@ -879,7 +915,7 @@ - once = 1; - - /* Patch bpflet for current identifier. */ -- insns[1] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __constant_htons(ident), 0, 1); -+ insns[1] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, htons(ident), 0, 1); - - if (setsockopt(icmp_sock, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter))) - perror("WARNING: failed to install socket filter\n"); -diff -Naur iputils.orig/ping_common.h iputils/ping_common.h ---- iputils.orig/ping_common.h 2002-09-20 15:08:11.000000000 +0000 -+++ iputils/ping_common.h 2005-06-09 16:15:24.000000000 +0000 -@@ -1,3 +1,4 @@ -+#include - #include - #include - #include -@@ -19,6 +20,7 @@ - - #include - #include -+#include - #include - - #include "SNAPSHOT.h" -diff -Naur iputils.orig/rarpd.c iputils/rarpd.c ---- iputils.orig/rarpd.c 2001-12-02 18:45:06.000000000 +0000 -+++ iputils/rarpd.c 2005-06-09 16:15:24.000000000 +0000 -@@ -9,6 +9,7 @@ - * Authors: Alexey Kuznetsov, - */ - -+#include - #include - #include - #include -@@ -26,6 +27,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -42,7 +44,9 @@ - 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 -@@ -52,12 +56,12 @@ - int hatype; - unsigned char lladdr[16]; - unsigned char name[IFNAMSIZ]; -- struct ifaddr *ifa_list; -+ struct l_ifaddr *ifa_list; - } *ifl_list; - --struct ifaddr -+struct l_ifaddr - { -- struct ifaddr *next; -+ struct l_ifaddr *next; - __u32 prefix; - __u32 mask; - __u32 local; -@@ -89,7 +93,7 @@ - int fd; - struct ifreq *ifrp, *ifend; - struct iflink *ifl; -- struct ifaddr *ifa; -+ struct l_ifaddr *ifa; - struct ifconf ifc; - struct ifreq ibuf[256]; - -@@ -180,7 +184,7 @@ - if (ifa == NULL) { - if (mask == 0 || prefix == 0) - continue; -- ifa = (struct ifaddr*)malloc(sizeof(*ifa)); -+ ifa = (struct l_ifaddr*)malloc(sizeof(*ifa)); - memset(ifa, 0, sizeof(*ifa)); - ifa->local = addr; - ifa->prefix = prefix; -@@ -236,10 +240,10 @@ - return dent != NULL; - } - --struct ifaddr *select_ipaddr(int ifindex, __u32 *sel_addr, __u32 **alist) -+struct l_ifaddr *select_ipaddr(int ifindex, __u32 *sel_addr, __u32 **alist) - { - struct iflink *ifl; -- struct ifaddr *ifa; -+ struct l_ifaddr *ifa; - int retry = 0; - int i; - -@@ -295,7 +299,7 @@ - - if (r == NULL) { - if (hatype == ARPHRD_ETHER && halen == 6) { -- struct ifaddr *ifa; -+ struct l_ifaddr *ifa; - struct hostent *hp; - char ename[256]; - static struct rarp_map emap = { -@@ -305,7 +309,11 @@ - 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"); -@@ -364,7 +372,7 @@ - { - __u32 laddr = 0; - struct iflink *ifl; -- struct ifaddr *ifa; -+ struct l_ifaddr *ifa; - - for (ifl=ifl_list; ifl; ifl = ifl->next) - if (ifl->index == ifindex) -diff -Naur iputils.orig/rdisc.c iputils/rdisc.c ---- iputils.orig/rdisc.c 2001-08-24 17:39:00.000000000 +0000 -+++ iputils/rdisc.c 2005-06-09 16:15:24.000000000 +0000 -@@ -25,6 +25,7 @@ - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -+#include - #include - #include - #include -@@ -1504,5 +1505,5 @@ - if (logging) - syslog(LOG_ERR, "%s: %m", str); - else -- (void) fprintf(stderr, "%s: %s\n", str, sys_errlist[errno]); -+ (void) fprintf(stderr, "%s: %s\n", str, strerror(errno)); - } -diff -Naur iputils.orig/tftpd.c iputils/tftpd.c ---- iputils.orig/tftpd.c 2002-01-24 00:31:41.000000000 +0000 -+++ iputils/tftpd.c 2005-06-09 16:15:24.000000000 +0000 -@@ -48,6 +48,7 @@ - * This version includes many modifications by Jim Guyton - */ - -+#include - #include - #include - #include -@@ -57,7 +58,6 @@ - - #include - #include --#include - #include - - #include -diff -Naur iputils.orig/tracepath.c iputils/tracepath.c ---- iputils.orig/tracepath.c 2002-11-09 04:54:46.000000000 +0000 -+++ iputils/tracepath.c 2005-06-09 16:15:24.000000000 +0000 -@@ -9,10 +9,12 @@ - * Authors: Alexey Kuznetsov, - */ - -+#include - #include - #include - #include - #include -+#include - #include - #include - #include -@@ -76,7 +78,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 +95,7 @@ - if (res < 0) { - if (errno == EAGAIN) - return progress; -- goto restart; -+ continue; - } - - progress = mtu; -@@ -216,7 +218,7 @@ - perror("NET ERROR"); - return 0; - } -- goto restart; -+ } - } - - int probe_ttl(int fd, int ttl) -@@ -227,7 +229,6 @@ - - memset(sndbuf,0,mtu); - --restart: - for (i=0; i<10; i++) { - int res; - -@@ -243,7 +244,8 @@ - if (res==0) - return 0; - if (res > 0) -- goto restart; -+ i = 0; -+ continue; - } - hisptr = (hisptr + 1)&63; - -diff -Naur iputils.orig/tracepath6.c iputils/tracepath6.c ---- iputils.orig/tracepath6.c 2001-09-02 02:03:46.000000000 +0000 -+++ iputils/tracepath6.c 2005-06-09 16:15:24.000000000 +0000 -@@ -9,13 +9,13 @@ - * Authors: Alexey Kuznetsov, - */ - -+#include - #include - #include - #include - #include - #include -- --#include -+#include - #include - #include - #include -@@ -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; - } - -diff -Naur iputils.orig/traceroute6.c iputils/traceroute6.c ---- iputils.orig/traceroute6.c 2002-10-03 03:29:23.000000000 +0000 -+++ iputils/traceroute6.c 2005-06-09 16:14:49.000000000 +0000 -@@ -244,11 +244,30 @@ - #include - #include - #include -+#if __linux__ -+#include -+#else - #include -+#endif -+ -+#include -+struct ipv6hdr { -+#if defined(__LITTLE_ENDIAN) -+ __u8 priority:4, -+ version:4; -+#elif defined(__BIG_ENDIAN) -+ __u8 version:4, -+ priority:4; -+#endif -+ __u8 flow_lbl[3]; - --#include --#include -+ __u16 payload_len; -+ __u8 nexthdr; -+ __u8 hop_limit; - -+ struct in6_addr saddr; -+ struct in6_addr daddr; -+}; - #include - - #include diff --git a/abs/core/iputils/iputils-ss021109-try.patch b/abs/core/iputils/iputils-ss021109-try.patch deleted file mode 100644 index 4d9a705..0000000 --- a/abs/core/iputils/iputils-ss021109-try.patch +++ /dev/null @@ -1,239 +0,0 @@ -diff -urN iputils.orig/Makefile iputils/Makefile ---- iputils.orig/Makefile 2004-05-02 20:30:43.000000000 +0000 -+++ iputils/Makefile 2004-05-02 20:30:48.000000000 +0000 -@@ -1,5 +1,4 @@ - # Path to parent kernel include files directory --KERNEL_INCLUDE=/usr/src/linux/include - LIBC_INCLUDE=/usr/include - - DEFINES= -@@ -8,21 +7,6 @@ - LDLIBS=-lresolv - ADDLIB= - --ifeq ($(LIBC_INCLUDE)/socketbits.h,$(wildcard $(LIBC_INCLUDE)/socketbits.h)) -- ifeq ($(LIBC_INCLUDE)/net/if_packet.h,$(wildcard $(LIBC_INCLUDE)/net/if_packet.h)) -- GLIBCFIX=-Iinclude-glibc -include include-glibc/glibc-bugs.h -- endif --endif --ifeq ($(LIBC_INCLUDE)/bits/socket.h,$(wildcard $(LIBC_INCLUDE)/bits/socket.h)) -- GLIBCFIX=-Iinclude-glibc -include include-glibc/glibc-bugs.h --endif -- --ifeq ($(KERNEL_INCLUDE)/linux/pfkeyv2.h,$(wildcard $(KERNEL_INCLUDE)/linux/pfkeyv2.h)) -- SUBDIRS=libipsec setkey -- LDLIBS+=-Llibipsec -lipsec -- IPSECDEF=-DDO_IPSEC -Ilibipsec --endif -- - - #options if you compile with libc5, and without a bind>=4.9.4 libresolv - # NOT AVAILABLE. Please, use libresolv. -@@ -31,13 +15,13 @@ - # 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) -I$(KERNEL_INCLUDE) -I../include $(IPSECDEF) $(DEFINES) -+CFLAGS=$(CCOPT) -I../include $(IPSECDEF) $(DEFINES) - - IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd - IPV6_TARGETS=tracepath6 traceroute6 ping6 - TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS) - --all: check-kernel subdirs $(TARGETS) -+all: subdirs $(TARGETS) - - - tftpd: tftpd.o tftpsubs.o -@@ -51,15 +35,6 @@ - rdisc_srv.o: rdisc.c - $(CC) $(CFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c - --check-kernel: --ifeq ($(KERNEL_INCLUDE),) -- @echo "Please, set correct KERNEL_INCLUDE"; false --else -- @set -e; \ -- if [ ! -r $(KERNEL_INCLUDE)/linux/autoconf.h ]; then \ -- echo "Please, set correct KERNEL_INCLUDE"; false; fi --endif -- - subdirs: - ifneq ($(SUBDIRS),) - @set -e; \ -diff -urN iputils.orig/arping.c iputils/arping.c ---- iputils.orig/arping.c 2004-05-02 20:30:43.000000000 +0000 -+++ iputils/arping.c 2004-05-02 20:32:38.000000000 +0000 -@@ -9,6 +9,7 @@ - * Authors: Alexey Kuznetsov, - */ - -+#include - #include - #include - #include -@@ -19,6 +20,8 @@ - #include - #include - #include -+#include -+#include - #include - - #include -diff -urN iputils.orig/clockdiff.c iputils/clockdiff.c ---- iputils.orig/clockdiff.c 2004-05-02 20:30:43.000000000 +0000 -+++ iputils/clockdiff.c 2004-05-02 20:30:48.000000000 +0000 -@@ -1,3 +1,4 @@ -+#include - #include - #include - #include -diff -urN iputils.orig/ping.c iputils/ping.c ---- iputils.orig/ping.c 2004-05-02 20:30:43.000000000 +0000 -+++ iputils/ping.c 2004-05-02 20:31:03.000000000 +0000 -@@ -61,7 +61,7 @@ - #include "ping_common.h" - - #include --#include -+#include - #ifdef DO_IPSEC - #include - #endif -diff -urN iputils.orig/ping_common.h iputils/ping_common.h ---- iputils.orig/ping_common.h 2004-05-02 20:30:43.000000000 +0000 -+++ iputils/ping_common.h 2004-05-02 20:30:48.000000000 +0000 -@@ -1,3 +1,4 @@ -+#include - #include - #include - #include -diff -urN iputils.orig/rarpd.c iputils/rarpd.c ---- iputils.orig/rarpd.c 2004-05-02 20:30:43.000000000 +0000 -+++ iputils/rarpd.c 2004-05-02 20:33:07.000000000 +0000 -@@ -9,6 +9,7 @@ - * Authors: Alexey Kuznetsov, - */ - -+#include - #include - #include - #include -@@ -26,6 +27,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -52,12 +54,12 @@ - int hatype; - unsigned char lladdr[16]; - unsigned char name[IFNAMSIZ]; -- struct ifaddr *ifa_list; -+ struct l_ifaddr *ifa_list; - } *ifl_list; - --struct ifaddr -+struct l_ifaddr - { -- struct ifaddr *next; -+ struct l_ifaddr *next; - __u32 prefix; - __u32 mask; - __u32 local; -@@ -89,7 +91,7 @@ - int fd; - struct ifreq *ifrp, *ifend; - struct iflink *ifl; -- struct ifaddr *ifa; -+ struct l_ifaddr *ifa; - struct ifconf ifc; - struct ifreq ibuf[256]; - -@@ -180,7 +182,7 @@ - if (ifa == NULL) { - if (mask == 0 || prefix == 0) - continue; -- ifa = (struct ifaddr*)malloc(sizeof(*ifa)); -+ ifa = (struct l_ifaddr*)malloc(sizeof(*ifa)); - memset(ifa, 0, sizeof(*ifa)); - ifa->local = addr; - ifa->prefix = prefix; -@@ -236,10 +238,10 @@ - return dent != NULL; - } - --struct ifaddr *select_ipaddr(int ifindex, __u32 *sel_addr, __u32 **alist) -+struct l_ifaddr *select_ipaddr(int ifindex, __u32 *sel_addr, __u32 **alist) - { - struct iflink *ifl; -- struct ifaddr *ifa; -+ struct l_ifaddr *ifa; - int retry = 0; - int i; - -@@ -295,7 +297,7 @@ - - if (r == NULL) { - if (hatype == ARPHRD_ETHER && halen == 6) { -- struct ifaddr *ifa; -+ struct l_ifaddr *ifa; - struct hostent *hp; - char ename[256]; - static struct rarp_map emap = { -@@ -364,7 +366,7 @@ - { - __u32 laddr = 0; - struct iflink *ifl; -- struct ifaddr *ifa; -+ struct l_ifaddr *ifa; - - for (ifl=ifl_list; ifl; ifl = ifl->next) - if (ifl->index == ifindex) -diff -urN iputils.orig/rdisc.c iputils/rdisc.c ---- iputils.orig/rdisc.c 2004-05-02 20:30:43.000000000 +0000 -+++ iputils/rdisc.c 2004-05-02 20:30:48.000000000 +0000 -@@ -25,6 +25,7 @@ - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -+#include - #include - #include - #include -diff -urN iputils.orig/tftpd.c iputils/tftpd.c ---- iputils.orig/tftpd.c 2004-05-02 20:30:43.000000000 +0000 -+++ iputils/tftpd.c 2004-05-02 20:30:48.000000000 +0000 -@@ -48,6 +48,7 @@ - * This version includes many modifications by Jim Guyton - */ - -+#include - #include - #include - #include -diff -urN iputils.orig/tracepath.c iputils/tracepath.c ---- iputils.orig/tracepath.c 2004-05-02 20:30:43.000000000 +0000 -+++ iputils/tracepath.c 2004-05-02 20:30:48.000000000 +0000 -@@ -9,6 +9,7 @@ - * Authors: Alexey Kuznetsov, - */ - -+#include - #include - #include - #include -diff -urN iputils.orig/traceroute6.c iputils/traceroute6.c ---- iputils.orig/traceroute6.c 2004-05-02 20:30:43.000000000 +0000 -+++ iputils/traceroute6.c 2004-05-02 20:30:48.000000000 +0000 -@@ -230,6 +230,7 @@ - * Tue Dec 20 03:50:13 PST 1988 - */ - -+#include - #include - #include - #include diff --git a/abs/core/iputils/iputils.install b/abs/core/iputils/iputils.install new file mode 100644 index 0000000..2481fb3 --- /dev/null +++ b/abs/core/iputils/iputils.install @@ -0,0 +1,11 @@ +post_install() { + setcap cap_net_raw=ep usr/bin/ping + setcap cap_net_raw=ep usr/bin/ping6 + echo " >> Traceroute is now provided by core/traceroute" +} + +post_upgrade() { + post_install "$1" +} + +# vim:set ts=2 sw=2 et: diff --git a/abs/core/iputils/iputils.patch b/abs/core/iputils/iputils.patch deleted file mode 100644 index 4e99b75..0000000 --- a/abs/core/iputils/iputils.patch +++ /dev/null @@ -1,1170 +0,0 @@ ---- iputils/ping_common.c.old Thu Mar 14 16:58:47 2002 -+++ iputils/ping_common.c Thu Mar 14 17:10:54 2002 -@@ -775,10 +775,10 @@ - tmdev = llsqrt(tsum2 - tsum * tsum); - - printf("rtt min/avg/max/mdev = %ld.%03ld/%lu.%03ld/%ld.%03ld/%ld.%03ld ms", -- tmin/1000, tmin%1000, -+ (long)tmin/1000, (long)tmin%1000, - (unsigned long)(tsum/1000), (long)(tsum%1000), -- tmax/1000, tmax%1000, -- tmdev/1000, tmdev%1000 -+ (long)tmax/1000, (long)tmax%1000, -+ (long)tmdev/1000, (long)tmdev%1000 - ); - } - if (pipesize > 1) -@@ -809,10 +809,10 @@ - tavg = tsum / (nreceived + nrepeats); - - fprintf(stderr, ", min/avg/ewma/max = %ld.%03ld/%lu.%03ld/%d.%03d/%ld.%03ld ms", -- tmin/1000, tmin%1000, -+ (long)tmin/1000, (long)tmin%1000, - tavg/1000, tavg%1000, - rtt/8000, (rtt/8)%1000, -- tmax/1000, tmax%1000 -+ (long)tmax/1000, (long)tmax%1000 - ); - } - fprintf(stderr, "\n"); ---- iputils/rdisc.c-org Wed May 1 00:27:34 2002 -+++ iputils/rdisc.c Wed May 1 00:32:40 2002 -@@ -63,6 +63,8 @@ - - #include "SNAPSHOT.h" - -+#define RDISC_SERVER -+ - struct interface - { - struct in_addr address; /* Used to identify the interface */ -@@ -163,11 +165,8 @@ - int debugfile; - - char usage[] = --"Usage: rdisc [-b] [-d] [-s] [-v] [-f] [-a] [-V] [send_address] [receive_address]\n" --#ifdef RDISC_SERVER --" rdisc -r [-b] [-d] [-s] [-v] [-f] [-a] [-V] [-p ] [-T ] \n" --" [send_address] [receive_address]\n" --#endif -+"Usage: rdisc -r [-b] [-d] [-s] [-v] [-f] [-a] [-V] [-p ] [-T ] \n" -+" [send_address] [receive_address]\n" - ; - - -@@ -875,7 +874,9 @@ - ((max_adv_int - min_adv_int) - * (random() % 1000)/1000); - } else { -- if (!is_directly_connected(ip->saddr)) { -+ struct in_addr tmp; -+ tmp.s_addr = ip->saddr; -+ if (!is_directly_connected(tmp)) { - if (verbose) - logtrace("ICMP %s from %s: source not directly connected\n", - pr_type((int)icp->type), -@@ -945,7 +946,6 @@ - { - #ifdef RDISC_SERVER - if (responder) { -- int i; - - /* Send out a packet with a preference so that all - * hosts will know that we are dead. ---- iputils/ping_common.c.countermeasures Tue May 21 10:06:05 2002 -+++ iputils/ping_common.c Tue May 21 10:12:42 2002 -@@ -628,7 +628,8 @@ - tvsub(tv, &tmp_tv); - triptime = tv->tv_sec * 1000000 + tv->tv_usec; - if (triptime < 0) { -- fprintf(stderr, "Warning: time of day goes back (%ldus), taking countermeasures.\n", triptime); -+ if (options & F_VERBOSE) -+ fprintf(stderr, "Warning: time of day goes back (%ldus), taking countermeasures.\n", triptime); - triptime = 0; - if (!(options & F_LATENCY)) { - gettimeofday(tv, NULL); ---- iputils/ping.c.addrcache 2002-09-20 17:08:11.000000000 +0200 -+++ iputils/ping.c 2003-05-15 16:41:19.000000000 +0200 -@@ -1124,6 +1124,12 @@ - { - struct hostent *hp; - static char buf[4096]; -+ static __u32 addr_cache = 0; -+ -+ if ( addr == addr_cache ) -+ return buf; -+ -+ addr_cache = addr; - - if ((options & F_NUMERIC) || - !(hp = gethostbyaddr((char *)&addr, 4, AF_INET))) ---- iputils/ping6.c.addrcache 2002-09-20 17:08:11.000000000 +0200 -+++ iputils/ping6.c 2003-05-15 16:41:19.000000000 +0200 -@@ -893,7 +893,14 @@ - */ - char * pr_addr(struct in6_addr *addr) - { -- struct hostent *hp = NULL; -+ static struct hostent *hp = NULL; -+ static struct in6_addr addr_cache = {{{0,0,0,0}}}; -+ -+ if ( addr->s6_addr32[0] == addr_cache.s6_addr32[0] && -+ addr->s6_addr32[1] == addr_cache.s6_addr32[1] && -+ addr->s6_addr32[2] == addr_cache.s6_addr32[2] && -+ addr->s6_addr32[3] == addr_cache.s6_addr32[3] ) -+ return hp ? hp->h_name : pr_addr_n(addr); - - if (!(options&F_NUMERIC)) - hp = gethostbyaddr((__u8*)addr, sizeof(struct in6_addr), AF_INET6); ---- iputils-ss021109-vanilla/ping.c Thu Nov 7 23:53:21 2002 -+++ iputils/ping.c Sun Jan 12 03:39:24 2003 -@@ -285,6 +285,9 @@ - perror("ping: IP_MULTICAST_IF"); - exit(2); - } -+ } else if (icmp_sock >= 0) { -+ /* We possible tried to SO_BINDTODEVICE() a subinterface like 'eth0:1' */ -+ perror("Warning: cannot bind to specified iface, falling back"); - } - } - } ---- iputils/ping.c.icmp_seq 2003-09-03 16:45:07.000000000 +0200 -+++ iputils/ping.c 2003-09-03 16:45:41.000000000 +0200 -@@ -610,7 +610,7 @@ - icp->type = ICMP_ECHO; - icp->code = 0; - icp->checksum = 0; -- icp->un.echo.sequence = htons(ntransmitted+1); -+ icp->un.echo.sequence = htons(ntransmitted); - icp->un.echo.id = ident; /* ID */ - - CLR((ntransmitted+1) % mx_dup_ck); ---- iputils/ping6.c.icmp_seq 2003-09-03 16:45:20.000000000 +0200 -+++ iputils/ping6.c 2003-09-03 16:45:34.000000000 +0200 -@@ -647,7 +647,7 @@ - icmph->icmp6_type = ICMPV6_ECHO_REQUEST; - icmph->icmp6_code = 0; - icmph->icmp6_cksum = 0; -- icmph->icmp6_sequence = htons(ntransmitted+1); -+ icmph->icmp6_sequence = htons(ntransmitted); - icmph->icmp6_identifier = ident; - - CLR((ntransmitted+1) % mx_dup_ck); -diff -ru iputils/include-glibc/netinet/in.h iputils-clean/include-glibc/netinet/in.h ---- iputils/include-glibc/netinet/in.h 2000-06-18 14:57:25.000000000 -0400 -+++ iputils-clean/include-glibc/netinet/in.h 2003-09-03 11:21:55.000000000 -0400 -@@ -8,4 +8,45 @@ - - #define SOL_IP 0 - --#endif /* netinet/in.h */ -+/* Functions to convert between host and network byte order. -+ -+ Please note that these functions normally take `unsigned long int' or -+ `unsigned short int' values as arguments and also return them. But -+ this was a short-sighted decision since on different systems the types -+ may have different representations but the values are always the same. */ -+ -+extern u_int32_t ntohl (u_int32_t __netlong) __THROW __attribute__ ((__const__)); -+extern u_int16_t ntohs (u_int16_t __netshort) -+ __THROW __attribute__ ((__const__)); -+extern u_int32_t htonl (u_int32_t __hostlong) -+ __THROW __attribute__ ((__const__)); -+extern u_int16_t htons (u_int16_t __hostshort) -+ __THROW __attribute__ ((__const__)); -+ -+#include -+ -+/* Get machine dependent optimized versions of byte swapping functions. */ -+#include -+ -+#ifdef __OPTIMIZE__ -+/* We can optimize calls to the conversion functions. Either nothing has -+ to be done or we are using directly the byte-swapping functions which -+ often can be inlined. */ -+# if __BYTE_ORDER == __BIG_ENDIAN -+/* The host byte order is the same as network byte order, -+ so these functions are all just identity. */ -+# define ntohl(x) (x) -+# define ntohs(x) (x) -+# define htonl(x) (x) -+# define htons(x) (x) -+# else -+# if __BYTE_ORDER == __LITTLE_ENDIAN -+# define ntohl(x) __bswap_32 (x) -+# define ntohs(x) __bswap_16 (x) -+# define htonl(x) __bswap_32 (x) -+# define htons(x) __bswap_16 (x) -+# endif -+# endif -+#endif -+ -+#endif /* netinet/in.h */ -diff -ru iputils/ping6.c iputils-clean/ping6.c ---- iputils/ping6.c 2003-09-03 11:22:46.000000000 -0400 -+++ iputils-clean/ping6.c 2003-09-03 11:15:42.000000000 -0400 -@@ -879,7 +879,7 @@ - once = 1; - - /* Patch bpflet for current identifier. */ -- insns[1] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __constant_htons(ident), 0, 1); -+ insns[1] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, htons(ident), 0, 1); - - if (setsockopt(icmp_sock, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter))) - perror("WARNING: failed to install socket filter\n"); -diff -ru iputils/ping.c iputils-clean/ping.c ---- iputils/ping.c 2003-09-03 11:22:46.000000000 -0400 -+++ iputils-clean/ping.c 2003-09-03 11:15:26.000000000 -0400 -@@ -1196,7 +1196,7 @@ - once = 1; - - /* Patch bpflet for current identifier. */ -- insns[2] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __constant_htons(ident), 0, 1); -+ insns[2] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, htons(ident), 0, 1); - - if (setsockopt(icmp_sock, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter))) - perror("WARNING: failed to install socket filter\n"); -diff -urN iputils/clockdiff.c iputils.new/clockdiff.c ---- iputils/clockdiff.c 2002-02-22 19:10:59.000000000 -0500 -+++ iputils.new/clockdiff.c 2003-09-10 09:20:28.000000000 -0400 -@@ -2,6 +2,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff -urN iputils/ping6.c iputils.new/ping6.c ---- iputils/ping6.c 2003-09-10 17:27:48.000000000 -0400 -+++ iputils.new/ping6.c 2003-09-10 17:22:43.000000000 -0400 -@@ -68,8 +68,44 @@ - */ - #include "ping_common.h" - --#include --#include -+struct ipv6_rt_hdr { -+ __u8 nexthdr; -+ __u8 hdrlen; -+ __u8 type; -+ __u8 segments_left; -+ -+ /* -+ * type specific data -+ * variable length field -+ */ -+}; -+ -+struct rt0_hdr { -+ struct ipv6_rt_hdr rt_hdr; -+ __u32 bitmap; /* strict/loose bit map */ -+ struct in6_addr addr[0]; -+ -+#define rt0_type rt_hdr.type; -+}; -+#define IPV6_SRCRT_TYPE_0 0 /* IPv6 type 0 Routing Header */ -+struct ipv6hdr { -+#if defined(__LITTLE_ENDIAN) -+ __u8 priority:4, -+ version:4; -+#elif defined(__BIG_ENDIAN) -+ __u8 version:4, -+ priority:4; -+#endif -+ __u8 flow_lbl[3]; -+ -+ __u16 payload_len; -+ __u8 nexthdr; -+ __u8 hop_limit; -+ -+ struct in6_addr saddr; -+ struct in6_addr daddr; -+}; -+ - #include - - #define BIT_CLEAR(nr, addr) do { ((__u32 *)(addr))[(nr) >> 5] &= ~(1U << ((nr) & 31)); } while(0) -diff -urN iputils/ping_common.h iputils.new/ping_common.h ---- iputils/ping_common.h 2002-09-20 11:08:11.000000000 -0400 -+++ iputils.new/ping_common.h 2003-09-10 17:16:16.000000000 -0400 -@@ -19,6 +19,7 @@ - - #include - #include -+#include - #include - - #include "SNAPSHOT.h" -diff -urN iputils/tftpd.c iputils.new/tftpd.c ---- iputils/tftpd.c 2002-01-23 19:31:41.000000000 -0500 -+++ iputils.new/tftpd.c 2003-09-10 09:39:45.000000000 -0400 -@@ -57,7 +57,6 @@ - - #include - #include --#include - #include - - #include -diff -urN iputils/tracepath6.c iputils.new/tracepath6.c ---- iputils/tracepath6.c 2001-09-01 22:03:46.000000000 -0400 -+++ iputils.new/tracepath6.c 2003-09-10 09:40:18.000000000 -0400 -@@ -14,8 +14,7 @@ - #include - #include - #include -- --#include -+#include - #include - #include - #include -diff -urN iputils/tracepath.c iputils.new/tracepath.c ---- iputils/tracepath.c 2002-02-22 19:10:59.000000000 -0500 -+++ iputils.new/tracepath.c 2003-09-10 06:14:35.000000000 -0400 -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff -urN iputils/traceroute6.c iputils.new/traceroute6.c ---- iputils/traceroute6.c 2002-09-20 11:44:22.000000000 -0400 -+++ iputils.new/traceroute6.c 2003-09-10 10:12:47.000000000 -0400 -@@ -246,9 +246,24 @@ - #include - #include - --#include --#include -+#include -+struct ipv6hdr { -+#if defined(__LITTLE_ENDIAN) -+ __u8 priority:4, -+ version:4; -+#elif defined(__BIG_ENDIAN) -+ __u8 version:4, -+ priority:4; -+#endif -+ __u8 flow_lbl[3]; -+ -+ __u16 payload_len; -+ __u8 nexthdr; -+ __u8 hop_limit; - -+ struct in6_addr saddr; -+ struct in6_addr daddr; -+}; - #include - - #include ---- iputils/arping.c.unaligned 2001-10-06 00:42:47.000000000 +0200 -+++ iputils/arping.c 2003-10-02 15:14:42.000000000 +0200 -@@ -332,7 +332,7 @@ - timeout = atoi(optarg); - break; - case 'I': -- device = optarg; -+ device = strdup(optarg); - break; - case 'f': - quit_on_reply=1; ---- iputils/traceroute6.c.inet_pton 2004-04-22 15:06:28.268797480 +0200 -+++ iputils/traceroute6.c 2004-04-22 15:06:35.727877941 +0200 -@@ -538,7 +538,7 @@ - } else { - (void) bzero((char *)&saddr, sizeof(saddr)); - saddr.sin6_family = AF_INET6; -- if (inet_pton(AF_INET6, source, &saddr.sin6_addr) < 0) -+ if (inet_pton(AF_INET6, source, &saddr.sin6_addr) <= 0) - { - Printf("traceroute: unknown addr %s\n", source); - exit(1); ---- iputils/traceroute6.c.old 2004-12-07 11:08:57.000000000 +0100 -+++ iputils/traceroute6.c 2004-12-07 11:14:09.397575536 +0100 -@@ -352,8 +352,11 @@ - icmp_sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); - socket_errno = errno; - -- setuid(getuid()); -- -+ if(setuid(getuid()) != 0) -+ { -+ perror("traceroute: setuid()"); -+ exit(-1); -+ } - on = 1; - seq = tos = 0; - to = (struct sockaddr_in6 *)&whereto; ---- iputils/ping6.c.old 2004-12-07 11:08:57.000000000 +0100 -+++ iputils/ping6.c 2004-12-07 11:13:40.707937024 +0100 -@@ -223,7 +223,11 @@ - socket_errno = errno; - - uid = getuid(); -- setuid(uid); -+ if(setuid(uid) != 0) -+ { -+ perror("ping: setuid()"); -+ exit(-1); -+ } - - source.sin6_family = AF_INET6; - memset(&firsthop, 0, sizeof(firsthop)); ---- iputils/ping.c.old 2004-12-07 11:08:57.000000000 +0100 -+++ iputils/ping.c 2004-12-07 11:13:27.523941296 +0100 -@@ -119,7 +119,11 @@ - socket_errno = errno; - - uid = getuid(); -- setuid(uid); -+ if(setuid(uid) != 0) -+ { -+ perror("ping: setuid()"); -+ exit(-1); -+ } - - source.sin_family = AF_INET; - ---- iputils/doc/ping.8.old 2002-09-27 19:12:47.000000000 +0200 -+++ iputils/doc/ping.8 2004-12-07 11:09:42.434160144 +0100 -@@ -112,7 +112,7 @@ - when finished. - .TP - \fB-R\fR --Record route. -+Record route. (IPv4 only) - Includes the RECORD_ROUTE option in the ECHO_REQUEST - packet and displays the route buffer on returned packets. - Note that the IP header is only large enough for nine such routes. ---- iputils/doc/ping.sgml.old 2002-09-20 14:55:50.000000000 +0200 -+++ iputils/doc/ping.sgml 2004-12-07 11:09:42.435159992 +0100 -@@ -190,7 +190,7 @@ - -