public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.0 TCP caches ip route
  2001-10-29 12:47 HIGMEM, SMP, 2.4.13 and Cerberus Rik van Riel
@ 2001-10-29 13:03 ` Manel Guerrero Zapata
  2001-10-29 13:41   ` Martin Eriksson
  0 siblings, 1 reply; 4+ messages in thread
From: Manel Guerrero Zapata @ 2001-10-29 13:03 UTC (permalink / raw)
  To: Kernel Mailing List

Hi,

I'm using 2.4.0 (but I thing that this is probably a 2.4.X problem).
If a execute a telnet command to certain address (like 10.0.0.1).
And the routing table says that packets for 10.0.0.1 should be
routed to the device dummy0,
The telnet keeps trying to connect. (till here everything is cool).
And then I change the routing table so now it should
send those packets to the ppp0 (where 10.0.0.1 is), but the
connexion does not get stablished anyway (till I get timeout).

The problem seems to be that the kernel
caches that the device for the connexion should be dummy0.
If then, I cancel the telnet and start it again
now (of course) it stablishes a telnet conexion though the ppp0.

This problem does not occur if I use ping instead of telnet
(probably because ping uses no socket).

Should not be a mechanism that flushes caches when routing
table changes?

If the cached info is attached to the socket structure
probably this flushing thing is not quite feasible, am I wrong?

I know you usually don't expect the device though your tcp
connection goes to change on the fly, but that actually can
happend, and maybe (IMHO) should be supported.

Maybe I'm missing something. (probably ;) )

Regards,

	Manel Guerrero

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

* Re: 2.4.0 TCP caches ip route
  2001-10-29 13:03 ` 2.4.0 TCP caches ip route Manel Guerrero Zapata
@ 2001-10-29 13:41   ` Martin Eriksson
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Eriksson @ 2001-10-29 13:41 UTC (permalink / raw)
  To: Manel Guerrero Zapata, Kernel Mailing List

----- Original Message -----
From: "Manel Guerrero Zapata" <manel.guerrero-zapata@nokia.com>
To: "Kernel Mailing List" <linux-kernel@vger.kernel.org>
Sent: Monday, October 29, 2001 2:03 PM
Subject: 2.4.0 TCP caches ip route


> Hi,
>
> I'm using 2.4.0 (but I thing that this is probably a 2.4.X problem).
> If a execute a telnet command to certain address (like 10.0.0.1).
> And the routing table says that packets for 10.0.0.1 should be
> routed to the device dummy0,
> The telnet keeps trying to connect. (till here everything is cool).
> And then I change the routing table so now it should
> send those packets to the ppp0 (where 10.0.0.1 is), but the
> connexion does not get stablished anyway (till I get timeout).
>
> The problem seems to be that the kernel
> caches that the device for the connexion should be dummy0.
> If then, I cancel the telnet and start it again
> now (of course) it stablishes a telnet conexion though the ppp0.
>
> This problem does not occur if I use ping instead of telnet
> (probably because ping uses no socket).
>
> Should not be a mechanism that flushes caches when routing
> table changes?
>
> If the cached info is attached to the socket structure
> probably this flushing thing is not quite feasible, am I wrong?
>
> I know you usually don't expect the device though your tcp
> connection goes to change on the fly, but that actually can
> happend, and maybe (IMHO) should be supported.
>
> Maybe I'm missing something. (probably ;) )

This sounds like a minor problem. I do think that if you already have an
established connection it would work just as you want it to do, but as you
describe it you don't have an established TCP connection. What I mean is
that you won't exactly loose your connection if you don't even have one at
the first place!

_____________________________________________________
|  Martin Eriksson <nitrax@giron.wox.org>
|  MSc CSE student, department of Computing Science
|  Umeå University, Sweden



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

* Re: 2.4.0 TCP caches ip route
       [not found] <3BDDB88C.1040009@blue-labs.org>
@ 2001-10-30  8:58 ` Manel Guerrero Zapata
  2001-10-30 13:43 ` Manel Guerrero Zapata
  1 sibling, 0 replies; 4+ messages in thread
From: Manel Guerrero Zapata @ 2001-10-30  8:58 UTC (permalink / raw)
  To: ext David Ford; +Cc: linux-kernel

ext David Ford wrote:
> 
> Try "ip route flush cache" or summarized, "ip r f c"
> 
> David
> 
> Manel Guerrero Zapata wrote:
> 
> >The problem seems to be that the kernel
> >caches that the device for the connexion should be dummy0.
> >If then, I cancel the telnet and start it again
> >now (of course) it stablishes a telnet conexion though the ppp0.
> >
> [snipped]


Hi,


Answering to David:

Well, I have not tried that yet. But that is not a real solution.
You are not supposed to be flushing the cache manualy
(Although it might work as kind of workaround)
the kernel should detect that this is a stale cached entry
and delete it.


Answering to Martin:

Sure for most of the people that's not a big deal.
And yes, you are right: if the tcp connection has
been stablished before playing with routing tables
then everything works just fine.

But, IMHO I thing TCP should not make any assumptions about
routing tables (not even during the stablishment of connection).
So, I personaly see this as a kernel bug.

I understand that this is an "optimization" of the kernel
code, but I thing you should have the possibility of
disabling it.


Regards,

        Manel Guerrero

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

* Re: 2.4.0 TCP caches ip route
       [not found] <3BDDB88C.1040009@blue-labs.org>
  2001-10-30  8:58 ` 2.4.0 TCP caches ip route Manel Guerrero Zapata
@ 2001-10-30 13:43 ` Manel Guerrero Zapata
  1 sibling, 0 replies; 4+ messages in thread
From: Manel Guerrero Zapata @ 2001-10-30 13:43 UTC (permalink / raw)
  To: ext David Ford; +Cc: linux-kernel

ext David Ford wrote:
> 
> Try "ip route flush cache" or summarized, "ip r f c"
> 
> David
> 
> Manel Guerrero Zapata wrote:
> 
> >The problem seems to be that the kernel
> >caches that the device for the connexion should be dummy0.
> >If then, I cancel the telnet and start it again
> >now (of course) it stablishes a telnet conexion though the ppp0.
> >
> [snipped]

Hi,

I've tried with:
	echo 0 > /proc/sys/net/ipv4/route/flush 
ip route flush cache is equivalent to: 
	cat /proc/sys/net/ipv4/route/min_delay > /proc/sys/net/ipv4/route/flush

It does not solve anything.
I don't know why.

So not even flushing manually the cache solves
the problem.

Any ideas about why?

	Manel

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

end of thread, other threads:[~2001-10-30 13:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <3BDDB88C.1040009@blue-labs.org>
2001-10-30  8:58 ` 2.4.0 TCP caches ip route Manel Guerrero Zapata
2001-10-30 13:43 ` Manel Guerrero Zapata
2001-10-29 12:47 HIGMEM, SMP, 2.4.13 and Cerberus Rik van Riel
2001-10-29 13:03 ` 2.4.0 TCP caches ip route Manel Guerrero Zapata
2001-10-29 13:41   ` Martin Eriksson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox