--- ndisc6-0.7.3.orig/src/tcpspray.c +++ ndisc6-0.7.3/src/tcpspray.c @@ -162,9 +162,11 @@ (unsigned long)blen); } + pid_t child = -1; if (echo) { - switch (fork ()) + child = fork (); + switch (child) { case 0: for (unsigned i = 0; i < n; i++) @@ -251,7 +253,10 @@ abort: close (fd); if (echo) + { + kill (child, SIGTERM); while (wait (NULL) == -1); + } return -1; } --- ndisc6-0.7.3.orig/src/traceroute.c +++ ndisc6-0.7.3/src/traceroute.c @@ -172,13 +172,16 @@ { char buf[NI_MAXHOST]; - if (getnameinfo (addr, addrlen, buf, sizeof (buf), NULL, 0, niflags)) - return; - printf (" %s", buf); + int c = getnameinfo (addr, addrlen, buf, sizeof (buf), NULL, 0, niflags); + if (c == 0) + printf (" %s", buf); if (getnameinfo (addr, addrlen, buf, sizeof (buf), NULL, 0, NI_NUMERICHOST | niflags)) return; + if (c != 0) + printf (" %s", buf); // work around DNS resolution failure + printf (" (%s) ", buf); } @@ -785,7 +788,7 @@ drop_sockets (); -#ifndef IPV6_PKTINFO +#ifdef IPV6_PKTINFO /* Set outgoing interface */ if (*ifname) { @@ -1005,7 +1008,7 @@ }; -static const char optstr[] = "AdEf:g:hIi:lm:Nnp:q:rSs:t:UVw:xz:"; +static const char optstr[] = "AdEFf:g:hIi:lm:Nnp:q:rSs:t:UVw:xz:"; int main (int argc, char *argv[]) --- ndisc6-0.7.3.orig/debian/ndisc6.linda +++ ndisc6-0.7.3/debian/ndisc6.linda @@ -0,0 +1,2 @@ +Tag: incorrect-file-perms +Data: /usr/bin/(ndisc6|rdisc6|rltraceroute6) --- ndisc6-0.7.3.orig/debian/control +++ ndisc6-0.7.3/debian/control @@ -0,0 +1,21 @@ +Source: ndisc6 +Section: net +Priority: optional +Maintainer: Rémi Denis-Courmont +Build-Depends: cdbs, debhelper (>= 4.1.0) +Standards-Version: 3.7.2 + +Package: ndisc6 +Architecture: any +Depends: ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends} +Description: IPv6 diagnostic tools + ndisc6 gathers a few diagnostic tools for IPv6 networks including: + - ndisc6, which performs ICMPv6 Neighbor Discovery in userland, + - rdisc6, which performs ICMPv6 Router Discovery in userland, + - rltraceroute6, a UDP/ICMP IPv6 implementation of traceroute, + - tcptraceroute6, a TCP/IPv6-based traceroute implementation, + - tcpspray6, a TCP/IP Discard/Echo bandwidth meter, + - addrinfo, easy script interface for hostname and address resolution, + - dnssort, DNS sorting script. + . + Homepage: http://www.simphalempin.com/dev/ndisc6/ --- ndisc6-0.7.3.orig/debian/rules +++ ndisc6-0.7.3/debian/rules @@ -0,0 +1,25 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk + +DEB_AC_AUX_DIR = $(DEB_SRCDIR)/admin +DEB_CONFIGURE_SCRIPT_ENV += LDFLAGS="-Wl,-z,defs -Wl,--as-needed" +#DEB_CONFIGURE_EXTRA_FLAGS = --disable-suid-install + +binary-post-install/ndisc6:: + find debian/ndisc6/ '(' -name 'addrinfo*' -o -name 'nameinfo*' ')' -delete +ifeq (,$(findstring --disable-suid-install,$(DEB_CONFIGURE_EXTRA_FLAGS))) + mkdir -p debian/ndisc6/usr/share/lintian/overrides/ + touch debian/ndisc6/usr/share/lintian/overrides/ndisc6 + mkdir -p debian/ndisc6/usr/share/linda/overrides/ + cp debian/ndisc6.linda \ + debian/ndisc6/usr/share/linda/overrides/ndisc6 + +binary-fixup/ndisc6:: + for b in ndisc6 rdisc6 rltraceroute6; do \ + chmod u+s debian/ndisc6/usr/bin/$$b ; \ + echo "ndisc6: setuid-binary usr/bin/$$b 4755 root/root" \ + >> debian/ndisc6/usr/share/lintian/overrides/ndisc6 ; \ + done +endif --- ndisc6-0.7.3.orig/debian/watch +++ ndisc6-0.7.3/debian/watch @@ -0,0 +1,6 @@ +# Compulsory line, this is a version 3 file +version=3 + +# +http://www.remlab.net/files/ndisc6/archive/ ndisc6-(.*).tar.bz2 + --- ndisc6-0.7.3.orig/debian/changelog +++ ndisc6-0.7.3/debian/changelog @@ -0,0 +1,62 @@ +ndisc6 (0.7.3-2) unstable; urgency=medium + + * Remove conflicting addrinfo from package (Closes: #404007). + * Remove nameinfo too as it depends upon addrinfo. + * Fix IPV6_PKTINFO detection (from upstream [364]). + * Fix traceroute6 -F (from upstream [366]). + * Fix traceroute6 temporary DNS error handling (from upstream [388]). + * Fix tcpspray echo fatal error deadlock (from upstream [418]). + + -- Rémi Denis-Courmont Thu, 21 Dec 2006 09:14:15 +0100 + +ndisc6 (0.7.3-1) unstable; urgency=low + + * New upstream release (adds IDN, fix traceroute6, fix Hurd support). + * Use ld --as-needed to avoid superfluous librt linking. + + -- Rémi Denis-Courmont Sun, 08 Oct 2006 20:21:18 +0300 + +ndisc6 (0.7.2-1) unstable; urgency=low + + * New upstream version adds dnssort, nameinfo and addrinfo, + * Make ndisc6, rltraceroute6, rdisc6 setuid, + upstream has added protection against local root compromise, + * Remove bogus define of IPV6_RECVHOPLIMIT, + * Remove IPV6_TCLASS define merged upstream. + + -- Rémi Denis-Courmont Tue, 12 Sep 2006 22:49:31 +0300 + +ndisc6 (0.6.8-1) unstable; urgency=low + + * New upstream version, fix tcpspray6 measurements. + * Supplement missing IPV6_TCLASS and IPV6_RECVHOPLIMIT from glibc manually. + + -- Rémi Denis-Courmont Fri, 1 Sep 2006 20:41:57 +0300 + +ndisc6 (0.6.7-1) unstable; urgency=low + + * New upstream version. + + -- Rémi Denis-Courmont Sat, 12 Aug 2006 23:42:40 +0300 + +ndisc6 (0.6.6-1) unstable; urgency=low + + * New upstream release. + * Fixed watch file. + * Initial release (Closes: #380654 -- ITP for ndisc6). + + -- Rémi Denis-Courmont Sat, 15 Jul 2006 13:41:06 +0300 + +ndisc6 (0.6.5-0remlab) unstable; urgency=low + + * New upstream release. + * Switch to CDBS. + + -- Rémi Denis-Courmont Fri, 7 Jul 2006 18:06:23 +0300 + +ndisc6 (0.6.4-0remlab) unstable; urgency=low + + * Initial internal release. + + -- Rémi Denis-Courmont Sat, 3 Jun 2006 21:09:54 +0300 + --- ndisc6-0.7.3.orig/debian/compat +++ ndisc6-0.7.3/debian/compat @@ -0,0 +1 @@ +4 --- ndisc6-0.7.3.orig/debian/copyright +++ ndisc6-0.7.3/debian/copyright @@ -0,0 +1,30 @@ +This package was debianized by Rémi Denis-Courmont on +Sat, 3 Jun 2006 10:33:22 +0300. + +It was downloaded from http://www.simphalempin.com/dev/ndisc6/ + +Upstream Author: Rémi Denis-Courmont + +Copyright: 2005-2006 Rémi Denis-Courmont + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2006, Rémi Denis-Courmont and +is licensed under the GPL, see above. +