Date: Thu, 21 Nov 2002 13:34:45 -0800 From: "Justin C. Walker" <justin@mac.com> To: freebsd-net@FreeBSD.ORG Subject: Re: Sockets and changing IP addresses Message-ID: <0DC02941-FD99-11D6-81FD-00306544D642@mac.com> In-Reply-To: <3DDD4D11.15376311@softweyr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0DC02941-FD99-11D6-81FD-00306544D642>