Date: Tue, 20 Jun 2000 18:52:29 +0100 From: Brian Somers <brian@Awfulhak.org> To: Terry Lambert <tlambert@primenet.com> Cc: arch@FreeBSD.ORG, brian@hak.lan.Awfulhak.org Subject: Re: Suggested change to BSD sockets API Message-ID: <200006201752.SAA64474@hak.lan.Awfulhak.org> In-Reply-To: Message from Terry Lambert <tlambert@primenet.com> of "Tue, 20 Jun 2000 17:26:32 -0000." <200006201726.KAA19419@usr01.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I believe Julian E did some work on this at one point but never finished it. The real problem is that once you've sent that first packet, your local IP number is cast in stone. You only have a chance of doing something prior to that - ie, at the point where data arrives at the interface and the interface decides it has to do something to establish an IP number. This is already done in ppp(8) if you use -nat and -auto. Ppp will retain the old IP number, assign the just-negotiated IP number with SIOCAIFADDR and NAT the outgoing packet just-in-time so that the initial connection succeeds. This isn't the most elegant way (it would be better to be able to bind to an interface that has no IP number and then retrospectively resolve the binding when an IP number is assigned), but it works. > One common problem I run into is that of cached state. > > In particular, if I have a dial-on-demand device that uses > a dynamic IP address assignment negotiated with the remote > side of the link, then all of my servers currently bound > and listening for incoming connections have to be clobbered > over the head for them to notice the IP address change. > > It seems to me that this could be better handled. > > The problem appears to be cached state information (I have > been meaning to write a white paper on "cached state considered > harmful"). > > For example, an inetd, a DNS server, or a sendmail bound to a > network address on an interface must be rebound when the IP > address changes. > > > I'd like to suggest that a new socket binding type be used; one > that binds not to an IP addres, but to an interface. > > The changes to support this don't seem that difficult; what do > others think about this? > > > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers. -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006201752.SAA64474>