From owner-freebsd-net@FreeBSD.ORG Sun Feb 6 06:43:08 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEEE5106566C for ; Sun, 6 Feb 2011 06:43:08 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 882A68FC13 for ; Sun, 6 Feb 2011 06:43:08 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id B448E46B0C; Sun, 6 Feb 2011 01:43:07 -0500 (EST) Date: Sun, 6 Feb 2011 06:43:07 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Prabhu Hariharan In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@freebsd.org Subject: Re: Connections not purged on address deletion X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Feb 2011 06:43:08 -0000 On Fri, 4 Feb 2011, Prabhu Hariharan wrote: > When I delete an IP-address from an interface, the TCP (and other) > connections using that local IP-address are not getting purged. The telnet > or ssh sessions on the other end just get hung, as FreeBSD address-deletion > doesn't handle this situation and fails to call pfctlinput() to notify > protocols on this event. The TCP connections simply linger in the system > and takes it due course on TCP timers to free those inpcbs. > > tcp4 0 0 30.30.30.31.22 30.30.30.30.58796 ESTABLISHED > > Is this by design? Or any significance on relying on applications > intelligently to do timeouts, without a notification from network layer? I don't know if it's by design per se, but it proves extremely handy in practice when 802.11 blips and DHCP goes funny. Or, perhaps more historically, when PPP was restarted, leading to addresses being removed and re-added. Robert