Package: iputils-tracepath
Version: 3:20100418-3
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The return hop guessing is only applied to intermediate hops (EHOSTUNREACH)
but not to the final hop (ECONNREFUSED).  This makes the "back" value 
reported in the resume bogus, as is easily demostrated by tracing to
localhost:

bjorn@canardo:~$ tracepath6 ::1
 1?: [LOCALHOST]                        0.016ms pmtu 16436
 1:  ip6-localhost                                         0.063ms reached
 1:  ip6-localhost                                         0.031ms reached
     Resume: pmtu 16436 hops 1 back 64 


This can be fixed by moving the guessing logic out of the switch
as shown in the attached patch.



Bjørn


- -- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (700, 'stable'), (600, 'unstable'), (500, 'stable-updates'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages iputils-tracepath depends on:
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib

iputils-tracepath recommends no packages.

Versions of packages iputils-tracepath suggests:
ii  traceroute                    1:2.0.15-1 Traces the route taken by packets 

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk3ovzgACgkQ10rqkowbIskwTwCdGmYOalXb10pjOSuwZJPC2bbU
pZMAnjyoyCNhjnOtrmiRi/jjS/lcon2v
=T+sY
-----END PGP SIGNATURE-----
--- iputils-20101006.orig/tracepath6.c  2011-01-24 09:10:05.000000000 +0100
+++ iputils-20101006/tracepath6.c       2011-06-03 12:51:39.000000000 +0200
@@ -250,6 +250,15 @@ restart:
                        printf("(This broken router returned corrupted payload) 
");
        }
 
+       if (rethops>=0) {
+               if (rethops<=64)
+                       rethops = 65-rethops;
+               else if (rethops<=128)
+                       rethops = 129-rethops;
+               else
+                       rethops = 256-rethops;
+       }
+
        switch (e->ee_errno) {
        case ETIMEDOUT:
                printf("\n");
@@ -275,12 +284,6 @@ restart:
                     e->ee_type == 3 &&
                     e->ee_code == 0)) {
                        if (rethops>=0) {
-                               if (rethops<=64)
-                                       rethops = 65-rethops;
-                               else if (rethops<=128)
-                                       rethops = 129-rethops;
-                               else
-                                       rethops = 256-rethops;
                                if (sndhops>=0 && rethops != sndhops)
                                        printf("asymm %2d ", rethops);
                                else if (sndhops<0 && rethops != ttl)

Reply via email to