2.4.0 TCP caches ip route

Manel Guerrero Zapata (manel.guerrero-zapata@nokia.com)
Mon, 29 Oct 2001 15:03:13 +0200


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/