netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Heffner <jheffner@psc.edu>
To: yoshfuji@linux-ipv6.org
Cc: netdev@vger.kernel.org, John Heffner <jheffner@psc.edu>
Subject: [PATCH 2/2] [iputils] Re-probe at same TTL after MTU reduction.
Date: Tue,  3 Apr 2007 14:20:35 -0400	[thread overview]
Message-ID: <11756244353377-git-send-email-jheffner@psc.edu> (raw)
In-Reply-To: <1175624435275-git-send-email-jheffner@psc.edu>

This fixes a bug that would miss a hop after an ICMP packet too big message,
since it would continue increase the TTL without probing again.
---
 tracepath.c  |    6 ++++++
 tracepath6.c |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/tracepath.c b/tracepath.c
index d035a1e..19b2c6b 100644
--- a/tracepath.c
+++ b/tracepath.c
@@ -352,8 +352,14 @@ main(int argc, char **argv)
 			exit(1);
 		}
 
+restart:
 		for (i=0; i<3; i++) {
+			int old_mtu;
+			
+			old_mtu = mtu;
 			res = probe_ttl(fd, ttl);
+			if (mtu != old_mtu)
+				goto restart;
 			if (res == 0)
 				goto done;
 			if (res > 0)
diff --git a/tracepath6.c b/tracepath6.c
index a010218..65c4a4a 100644
--- a/tracepath6.c
+++ b/tracepath6.c
@@ -422,8 +422,14 @@ int main(int argc, char **argv)
 			exit(1);
 		}
 
+restart:
 		for (i=0; i<3; i++) {
+			int old_mtu;
+			
+			old_mtu = mtu;
 			res = probe_ttl(fd, ttl);
+			if (mtu != old_mtu)
+				goto restart;
 			if (res == 0)
 				goto done;
 			if (res > 0)
-- 
1.5.0.2.gc260-dirty


  reply	other threads:[~2007-04-03 19:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-03 18:20 [PATCH 1/2] [iputils] Fix asymm messages John Heffner
2007-04-03 18:20 ` John Heffner [this message]
2007-04-09  4:17   ` [PATCH 2/2] [iputils] Re-probe at same TTL after MTU reduction YOSHIFUJI Hideaki / 吉藤英明
2007-04-09  4:16 ` [PATCH 1/2] [iputils] Fix asymm messages YOSHIFUJI Hideaki / 吉藤英明

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11756244353377-git-send-email-jheffner@psc.edu \
    --to=jheffner@psc.edu \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).