Re: [Nmh-workers] IPv6-ifying nmh
A few particular corner cases to make sure we handle right: 1) IPv6 is supported, but not enabled on the system (no interfaces, not even loopback, have an IPv6 addr bound to them). I've gotten bit by this on Solaris (see http://sunsolve.sun.com/search/document.do?assetkey=1-66-240906-1 for a related example), and Redhat/Fedora boxes. I don't know what the issue is here, but I think the key is to try all of the addresses returned by getaddrinfo(). 2) IPv6 is turned up, but the local MTA only binds to 127.0.0.1 and not to ::1 or ::*. Well, personally I don't use mts/smtp to connect to the local MTA, but whatever. Again, trying all addresses returned by getaddrinfo() should solve this. --Ken ___ Nmh-workers mailing list Nmh-workers@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-workers
Re: [Nmh-workers] IPv6-ifying nmh
Date:Mon, 12 Jan 2009 10:52:00 -0500 From:Ken Hornstein k...@cmf.nrl.navy.mil Message-ID: 200901121552.n0cfq2bs001...@hedwig.cmf.nrl.navy.mil | I don't know what the issue is here, but I think the key is to try all | of the addresses returned by getaddrinfo(). What's probably most important is to not issue bogus error messages. That is, if getaddrinfo() returns a v6 address, but connecting to it fails (after which you go on to try a v4 address perhaps, which also fails) the common practice of reporting the first detected error is often what causes problems. Not to the application, if any address works, no error is reported, and everyone is happy, but to the sanity of the user, who often tends to see an error message reporting v6 failures when they never expected v6 to work for them - but getaddrinfo() happened to return a v6 address first. That causes people to waste lots of time debugging the wrong problem (the real issue in the postulated case isn't why the v6 connect() failed, but why the later v4 connect() didn't work). Doing this well is not at all easy, sometimes the best course is to simply note unable to connect to domain.name and 'forget' to mention the IP address (any IP address of any version) and omit the strerror() explanation for why the connect failed (because guessing which of the several errno values that ended up being seen is the one the user needs to know about is just that - guessing). kre ___ Nmh-workers mailing list Nmh-workers@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-workers
Re: [Nmh-workers] IPv6-ifying nmh
Considering getaddrinfo() is part of POSIX, I'd say make the change. If someone wants to run nmh on something scary and old, they can run a scary and old version of nmh. As long as we're considering things for the chopping block: - RPOP? (What's RPOP? Near as I can tell, it's using POP from a reserved port. Maybe something else is involved. Anyway, a chunk of code). - MPOP? --Ken ___ Nmh-workers mailing list Nmh-workers@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-workers
Re: [Nmh-workers] IPv6-ifying nmh
I think my preference would be for switching the code to using getaddrinfo et al, and adding autoconf-shims to implement those functions in terms of the old APIs if we need to. (Cleaner than lots of ifdefs.) My only concern is that I can't easily test the autoconf shims because I don't think I have access to old operating systems anymore. In theory I could cobble up a test environment, but for me that's past the point of diminishing returns. So if someone else wants to write them, great. Otherwise ... we won't have them. --Ken ___ Nmh-workers mailing list Nmh-workers@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-workers
Re: [Nmh-workers] IPv6-ifying nmh
Ken Hornstein wrote: I think my preference would be for switching the code to using getaddrinfo et al, and adding autoconf-shims to implement those functions in terms of the old APIs if we need to. (Cleaner than lots of ifdefs.) My only concern is that I can't easily test the autoconf shims because I don't think I have access to old operating systems anymore. In theory I could cobble up a test environment, but for me that's past the point of diminishing returns. So if someone else wants to write them, great. Otherwise ... we won't have them. Yeah, I wasn't really proposing that we add them before somebody comes along with a system that needs them. -- PMM ___ Nmh-workers mailing list Nmh-workers@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-workers
Re: [Nmh-workers] IPv6-ifying nmh
I say go for it. If this ends up breaking nmh for someone we can fix it then. If no-body complains it's less work. Thanks (谢谢). Jeff Ken Hornstein k...@cmf.nrl.navy.mil wrote: I was doing some work on the smtp code for nmh, and I couldn't help noticing that it has no IPv6 support. Does anyone have any strong feelings about moving nmh to the use of getaddrinfo()/struct sockaddr_storage (and all of the associated goo for doing IPv6 support)? Can this change just be made wholesale, or do people still want to use nmh on systems which do not support getaddrinfo() and struct sockaddr_storage, and thus we need some autoconf glue? (Making this change will result in a simplification of a lot of code, so I think it's worthwhile just on it's own). --Ken ___ Nmh-workers mailing list Nmh-workers@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-workers -- Jeffrey C. Honig j...@honig.net http://www.honig.net/jch GnuPG ID:14E29E13 http://www.honig.net/jch/key.shtml ___ Nmh-workers mailing list Nmh-workers@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-workers
Re: [Nmh-workers] IPv6-ifying nmh
On Fri, 09 Jan 2009 11:23:00 EST, Ken Hornstein said: I was doing some work on the smtp code for nmh, and I couldn't help noticing that it has no IPv6 support. Go for it. A few particular corner cases to make sure we handle right: 1) IPv6 is supported, but not enabled on the system (no interfaces, not even loopback, have an IPv6 addr bound to them). I've gotten bit by this on Solaris (see http://sunsolve.sun.com/search/document.do?assetkey=1-66-240906-1 for a related example), and Redhat/Fedora boxes. 2) IPv6 is turned up, but the local MTA only binds to 127.0.0.1 and not to ::1 or ::*. pgpfLvJbbBvHZ.pgp Description: PGP signature ___ Nmh-workers mailing list Nmh-workers@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-workers