Re: Bug? IP changes and persistant connections.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 25, 2001 at 12:17:45AM +0000, John Fremlin wrote:
> 
> Suppose a process has an open TCP connection to e.g. a newsserver
> somewhere across the 'net. Suppose that the interface through which
> this connection is made has its IP address changed. Then the process
> can try to send all the data it wants without getting anywhere, but in
> linux-2.4.0, at least, no errors from send(2) are returned.

It's no bug but a TCP/IP design feature.

Applying ftp.suse.com:/pub/people/ak/v2.2/iff-dynamic* and setting 
the dynamic flag on the network device using ifconfig will kill all 
connections bound to it.  Currently for 2.2 only. 

> Fooling around in the source, I saw that I most probably want to catch
> NETDEV_CHANGEADDR and NETDEV_DOWN as thrown by
> linux/net/ipv4/devinet.c and scan the list of active connections
> somehow or other and kill (tcp_write_err?) the ones that have the old
> local address. Is there any reason not to do this - i.e. should it be
> a sysctl?

That is more or less what iff-dynamic does.

There are various reasons not to do it generally because it breaks in 
many setups, but when the user knows what he's doing (= sets dynamic) 
it's probably fine. 

The implementation is not perfect, it would be better if the hangup was
triggered by user space.


-Andi
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux