looks similar to what I started writing on friday (tho you've gotten a lot farther than I did). I'll play around with this a bit. is this for proposal into 2.0.1? or 2.1? Jeff On Mon, 2004-09-13 at 18:11 +0800, Not Zed wrote: > > This rather big patch addresses a major issue with network connections > from camel, that is, only 1 type of address is supported (ipv6 or > ipv4) for a given host at a time, and only one physical address for > that host will ever be tried, even if multiple addresses of the same > format exist. The only other way to address this issue would be to > have all of the service connect calls perform two lookups using an > extended gethostbyname2_r interface, which is only available on GNU > anyway, where we already have getaddrinfo. It would be a messier and > even less portable solution. What we have now though is 'really > wrong'. > > Most of the patch is just changing the api's to suit the changes and > to clean up some of the related apis too. And to remove a lot of ipv6 > vs ipv4 specific code from most of the places where it doesn't need to > know about the difference (like, just about everywhere, even the stuff > in stream-ssl could probably just use memcpy). > > The main change is the new hostname resolution interfaces, which are > async/cancellable like the old ones, and use a getaddrinfo/getnameinfo > interface rather than a gethostby* interface. So it emulates > getaddrinfo when it isn't available, and forces ipv4 in that case. > Sure it could also handle some ipv6 stuff, but i just don't care. > > I'm inclined to simply drop support for all systems which don't > support getaddrinfo/getnameinfo anyway, because its too much pain to > deal with different address formats using the old-style interfaces. > But for now the patch has a very limited emulation which mostly seems > to work. > > Some configure changes mean that ipv6 is simply enabled by default if > your system has the necessary interfaces, and it always uses those > interfaces if available even if you force it to use ipv4 (not that i > can see there's actually a reason to want to do this). > > I would bet my house on there being lots of portability issues with it > all though. e.g. redefining struct addrinfo on half/broken systems. > > It hasn't been tested a lot, so there are probably other bugs too. > > -- > > Michael Zucchi <notzed ximian com> > "born to die, live to work, it's > all downhill from here" > Novell's Evolution and Free > Software Developer -- Jeffrey Stedfast Evolution Hacker - Novell, Inc. fejj ximian com - www.novell.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature