diff -ru tcptraceroute-1.3/changelog tcptraceroute-1.4/changelog --- tcptraceroute-1.3/changelog Sun May 19 23:18:50 2002 +++ tcptraceroute-1.4/changelog Tue Jul 30 17:51:29 2002 @@ -3,6 +3,16 @@ /* * Revision history: * + * Version 1.4 (2002-07-30) + * + * Added linklayer support for Linux ISDN Sync-PPP interfaces, + * by Dr. Peter Bieringer + * + * Adds support back for DLT_RAW interfaces, which was inadvertently + * removed sometime between 1.2 and 1.3beta1, and as a result caused + * tcptraceroute to fail over PPP interfaces. Reported in Debian + * Bug#154793 by David Harris . + * * Version 1.3 (2002-05-19) * * Now detects (and ignores) IP packets with IP options. diff -ru tcptraceroute-1.3/debian/changelog tcptraceroute-1.4/debian/changelog --- tcptraceroute-1.3/debian/changelog Sun May 19 21:21:48 2002 +++ tcptraceroute-1.4/debian/changelog Tue Jul 30 17:45:27 2002 @@ -1,3 +1,10 @@ +tcptraceroute (1.4-0woody1) stable; urgency=low + + * New upstream version. + * Closes: #154793: tcptracroute fails on PPP connections + + -- Michael C. Toren Tue, 30 Jul 2002 17:43:10 -0400 + tcptraceroute (1.3-0potato1) stable; urgency=low * New upstream version. diff -ru tcptraceroute-1.3/debian/copyright tcptraceroute-1.4/debian/copyright --- tcptraceroute-1.3/debian/copyright Wed Nov 21 14:46:57 2001 +++ tcptraceroute-1.4/debian/copyright Tue Jul 30 17:50:01 2002 @@ -14,7 +14,7 @@ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -A copy of the GNU GPL is available as /usr/share/common-licenses/GPL on Debian +A copy of the GNU GPL is available as /usr/share/common-licenses/GPL-2 on Debian systems, or on the World Wide Web at http://www.gnu.org/copyleft/gpl.html You can also obtain it by writing to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA diff -ru tcptraceroute-1.3/debian/dirs tcptraceroute-1.4/debian/dirs --- tcptraceroute-1.3/debian/dirs Sun Jul 1 13:57:37 2001 +++ tcptraceroute-1.4/debian/dirs Tue Jul 30 17:50:14 2002 @@ -1 +1 @@ -usr/sbin +usr/bin diff -ru tcptraceroute-1.3/debian/rules tcptraceroute-1.4/debian/rules --- tcptraceroute-1.3/debian/rules Wed Aug 1 00:31:34 2001 +++ tcptraceroute-1.4/debian/rules Tue Jul 30 17:50:52 2002 @@ -37,7 +37,7 @@ dh_installdirs # Add here commands to install the package into debian/tmp. - $(MAKE) install DESTDIR=`pwd`/debian/tmp/usr/sbin/ + $(MAKE) install DESTDIR=`pwd`/debian/tmp/usr/bin/ # Build architecture-independent files here. @@ -68,8 +68,8 @@ dh_compress dh_fixperms # You may want to make some executables suid here. - chmod 4755 debian/tmp/usr/sbin/tcptraceroute - chown root.root debian/tmp/usr/sbin/tcptraceroute + chmod 4755 debian/tmp/usr/bin/tcptraceroute + chown root.root debian/tmp/usr/bin/tcptraceroute # dh_makeshlibs dh_installdeb # dh_perl diff -ru tcptraceroute-1.3/tcptraceroute.c tcptraceroute-1.4/tcptraceroute.c --- tcptraceroute-1.3/tcptraceroute.c Sun May 19 22:55:15 2002 +++ tcptraceroute-1.4/tcptraceroute.c Tue Jul 30 17:51:27 2002 @@ -30,13 +30,23 @@ * Updates are available from http://michael.toren.net/code/tcptraceroute/ */ -#define VERSION "tcptraceroute 1.3 (2002-05-19)" +#define VERSION "tcptraceroute 1.4 (2002-07-30)" #define BANNER "Copyright (c) 2001, 2002 Michael C. Toren \n\ Updates are available from http://michael.toren.net/code/tcptraceroute/\n" /* * Revision history: * + * Version 1.4 (2002-07-30) + * + * Added linklayer support for Linux ISDN Sync-PPP interfaces, + * by Dr. Peter Bieringer + * + * Adds support back for DLT_RAW interfaces, which was inadvertently + * removed sometime between 1.2 and 1.3beta1, and as a result caused + * tcptraceroute to fail over PPP interfaces. Reported in Debian + * Bug#154793 by David Harris . + * * Version 1.3 (2002-05-19) * * Now detects (and ignores) IP packets with IP options. @@ -237,12 +247,18 @@ char *name; } datalinktypes[] = { +#ifdef DLT_RAW + { DLT_RAW, 0, "RAW" }, +#endif #ifdef DLT_EN10MB { DLT_EN10MB, 14, "ETHERNET" }, #endif #ifdef DLT_PPP { DLT_PPP, 4, "PPP" }, #endif +#ifdef DLT_LINUX_SLL + { DLT_LINUX_SLL, 16, "PPP_HDLC" }, +#endif #ifdef DLT_SLIP { DLT_SLIP, 16, "SLIP" }, #endif @@ -266,9 +282,6 @@ #endif /* Does anyone know correct values for these? */ -#ifdef DLT_RAW - { DLT_RAW, -1, "RAW" }, -#endif #ifdef DLT_ATM_RFC1483 { DLT_ATM_RFC1483, -1, "ATM_RFC1483" }, #endif @@ -940,7 +953,7 @@ if (! (record->addr == INADDR_ANY && record->q == 1)) { /* if timeout, only print one space. otherwise, two */ - if ((record->addr == INADDR_ANY) || (lastaddr == INADDR_ANY)) + if ((record->addr == INADDR_ANY) || (lastaddr == INADDR_ANY && record->q > 1)) printf(" "); else printf(" "); @@ -1451,11 +1464,12 @@ debug("Received icmp packet\n"); /* - * The IP header that generated the ICMP packet is quoted - * here. I don't know what the +4 is, but it works. + * The IP header, plus eight bytes of it's payload that generated + * the ICMP packet is quoted here, prepended with four bytes of + * padding. */ - if (len < LIBNET_IP_H + LIBNET_ICMP_H + 4 + LIBNET_IP_H + 4) + if (len < LIBNET_IP_H + LIBNET_ICMP_H + 4 + LIBNET_IP_H + 8) { debug("Ignoring icmp packet with incomplete payload\n"); continue; @@ -1464,7 +1478,11 @@ ALIGN_PACKET(old_ip_hdr, libnet_ip_hdr, 0 + LIBNET_IP_H + LIBNET_ICMP_H + 4); - /* The entire TCP header isn't here, but the port numbers are */ + /* + * The entire TCP header isn't here, but the source port, + * destination port, and sequence number fiels are. + */ + ALIGN_PACKET(old_tcp_hdr, libnet_tcp_hdr, 0 + LIBNET_IP_H + LIBNET_ICMP_H + 4 + LIBNET_IP_H); diff -ru tcptraceroute-1.3/tcptraceroute.lsm tcptraceroute-1.4/tcptraceroute.lsm --- tcptraceroute-1.3/tcptraceroute.lsm Sun May 19 22:55:12 2002 +++ tcptraceroute-1.4/tcptraceroute.lsm Tue Jul 30 17:46:04 2002 @@ -1,7 +1,7 @@ Begin4 Title: tcptraceroute -Version: 1.3 -Entered-date: 2002-05-19 +Version: 1.4 +Entered-date: 2002-07-30 Description: A traceroute implementation using TCP packets Keywords: network, traceroute, firewall Author: mct@toren.net (Michael C. Toren)