From owner-freebsd-net Thu Nov 21 13:34:49 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 CCE9A37B401 for ; Thu, 21 Nov 2002 13:34:47 -0800 (PST) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52E7843E91 for ; Thu, 21 Nov 2002 13:34:47 -0800 (PST) (envelope-from justin@mac.com) Received: from asmtp02.mac.com (asmtp02-qfe3 [10.13.10.66]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id gALLYlau013722 for ; Thu, 21 Nov 2002 13:34:47 -0800 (PST) Received: from grinch ([12.234.224.67]) by asmtp02.mac.com (Netscape Messaging Server 4.15) with ESMTP id H5Y3XY00.83Y for ; Thu, 21 Nov 2002 13:34:46 -0800 Date: Thu, 21 Nov 2002 13:34:45 -0800 Subject: Re: Sockets and changing IP addresses Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) From: "Justin C. Walker" To: freebsd-net@FreeBSD.ORG Content-Transfer-Encoding: 7bit In-Reply-To: <3DDD4D11.15376311@softweyr.com> Message-Id: <0DC02941-FD99-11D6-81FD-00306544D642@mac.com> X-Mailer: Apple Mail (2.482) 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 On Thursday, November 21, 2002, at 01:16 PM, Wes Peters wrote: > Archie Cobbs 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. > >> Do people agree that my suggestion of returning ENETDOWN is reasonable? > > Wow. There are other possibilities, EADDRNOTAVAIL or ECONNABORTED. > It doesn't matter so long as it the errno is unique to this situation > across all syscalls that might encounter it; ENETDOWN seems to meet > this criteria. A thought: An attempt to reconnect will succeed, given the scenario above, and ENETDOWN implies that the network is unavailable, so I don't think this is a good response. ECONNABORTED might be better (and EADDRNOTAVAIL isn't really germane). Regards, Justin -- Justin C. Walker, Curmudgeon-At-Large * Institute for General Semantics | If you're not confused, | You're not paying attention *--------------------------------------*-------------------------------* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message