netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* icmp_unreachable uses wrong ip
@ 2005-05-02 13:21 J. Simonetti
  2005-05-02 13:59 ` Hasso Tepper
  2005-05-03  9:22 ` Lennert Buytenhek
  0 siblings, 2 replies; 17+ messages in thread
From: J. Simonetti @ 2005-05-02 13:21 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

I've recently come to notice that traceroutes through a linux router use
the wrong ip (ip of exitting interface) wich should actually be the ip
of the incomming interface.

I've found a trivial patch (attached) wich resolves this. Perhaps this
is something to include (or have a sysctl to toggle this behaviour). I
unfortunately have no knowledge of programming, so the sysctl option
would have te be done by a volunteer.

Regards,

Jeroen Simonetti
--
Netland Internet Services   http://www.netland.nl
I despise the pleasure of pleasing people whom I despise.

[-- Attachment #2: icmp_traceroute.patch --]
[-- Type: text/x-patch, Size: 380 bytes --]

--- net/ipv4/icmp.orig   2005-05-02 04:55:53.512447464 +0200
+++ net/ipv4/icmp.c      2005-05-02 04:56:21.370212440 +0200
@@ -512,7 +512,7 @@
 
	saddr = iph->daddr;
	if (!(rt->rt_flags & RTCF_LOCAL))
-		saddr = 0;
+		saddr = inet_select_addr(skb_in->dev, 0, RT_SCOPE_LINK);
 
	tos = icmp_pointers[type].error ? ((iph->tos & IPTOS_TOS_MASK) |
					   IPTOS_PREC_INTERNETCONTROL) :

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2005-05-04  8:29 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-02 13:21 icmp_unreachable uses wrong ip J. Simonetti
2005-05-02 13:59 ` Hasso Tepper
2005-05-02 14:52   ` Patrick McHardy
2005-05-02 17:38     ` Hasso Tepper
2005-05-02 22:04       ` Patrick McHardy
2005-05-03  6:44         ` Hasso Tepper
2005-05-03 18:15           ` Patrick McHardy
2005-05-03 23:35             ` Hasso Tepper
2005-05-03 23:37               ` Patrick McHardy
2005-05-04  8:29                 ` Lennert Buytenhek
2005-05-04  7:03         ` Meelis Roos
2005-05-03 11:46   ` Hasso Tepper
2005-05-03  9:22 ` Lennert Buytenhek
2005-05-03  9:42   ` Pekka Savola
2005-05-03 10:38     ` Lennert Buytenhek
2005-05-03 11:00       ` Hasso Tepper
2005-05-04  1:15     ` Glen Turner

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).