From owner-freebsd-net Thu Nov 21 14: 0:14 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CC3037B401 for ; Thu, 21 Nov 2002 14:00:13 -0800 (PST) Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B01A43EA3 for ; Thu, 21 Nov 2002 14:00:11 -0800 (PST) (envelope-from archie@dellroad.org) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id NAA84649; Thu, 21 Nov 2002 13:53:42 -0800 (PST) Received: from arch20m.dellroad.org (localhost [127.0.0.1]) by arch20m.dellroad.org (8.12.6/8.12.6) with ESMTP id gALLrfOS067353; Thu, 21 Nov 2002 13:53:41 -0800 (PST) (envelope-from archie@arch20m.dellroad.org) Received: (from archie@localhost) by arch20m.dellroad.org (8.12.6/8.12.6/Submit) id gALLreeX067352; Thu, 21 Nov 2002 13:53:40 -0800 (PST) From: Archie Cobbs Message-Id: <200211212153.gALLreeX067352@arch20m.dellroad.org> Subject: Re: Sockets and changing IP addresses In-Reply-To: To: Don Bowman Date: Thu, 21 Nov 2002 13:53:40 -0800 (PST) Cc: "'Wes Peters'" , Archie Cobbs , freebsd-net@freebsd.org X-Mailer: ELM [version 2.4ME+ PL99b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Don Bowman wrote: > > > I'm curious what -net's opinion is on PR kern/38544: > > > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/38554 > > > > > > In summary: if you have a connected socket whose local IP address > > > is X, and then change the interface IP address from X to Y, then > > > packets written out by the socket will continue to be transmitted > > > with source IP address X. > > > > > > Do people agree that this is a bug and should be fixed? > > > > Yes. The other end can't possibly reply to address X, so the > > connection is broken at this point. > > I think the current behaviour is correct. Since the IP->MAC lookup > will remain cached, the communication will continue to work to the old > IP. Changing the IP on the connected socket will make the connection > drop. The best case is the the way it works. What you're saying doesn't make sense to me. First of all, this has nothing to do with ARP tables (although you are right that the router's ARP entry for the old IP address will remain valid). Secondly, the communiation will NOT work because the host will drop packets sent to it with the (now) wrong IP address. The current behavior is bad because the application does not ever receive any notification that the socket it's using is no longer valid. -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message