Article View: news.software.nntp
Article #78649Re: Regarding INN - name to address resolution for peers
From: D. Stussy
Date: Tue, 05 Feb 2008 23:11
Date: Tue, 05 Feb 2008 23:11
68 lines
5086 bytes
5086 bytes
"Russ Allbery" <rra@stanford.edu> wrote in message news:87fxw71bi4.fsf@windlord.stanford.edu... > "D. Stussy" <spam@bde-arc.ampr.org> writes: > > > Look's like I need to see what changes to the source (stable) in the > > past month before continuing, but it's clear that the January 1 snapshot > > of innfeed did NOT cycle through the various AF's and addresses - simply > > trying the first one (first address of the first AF) returned by the > > resolver - and that was the problem my peer had with connecting to me in > > that he consistently was trying to connect via an AF (IPv6) that his > > kernel didn't support. > > CURRENT cycles through all available returns from getaddrinfo. STABLE > does not. The IPv6 support in STABLE is bolted on the side and isn't > finished. CURRENT has native IPv6 support. > > > If this has been fixed, maybe 2.4.4 should be released instead of > > waiting for 2.5.0? > > I have had no time to work on INN for about a year and a half and no > prospects of that improving in the forseeable future. :/ This has > seriously impacted the release schedule of INN. > > Realistically, if there's anyone else who is interested in stepping up to > take on more of INN development, it's probably time for me to step down as > the release manager and lead developer, given that I'm doing neither. > I've been meaning to say something about that for a while, but I've > basically only had time to be reactive and hence don't think about it > until I'm responding to messages like this. > > I'll go send that to inn-workers as well now that I'm thinking about it. > I'd been planning on doing that for a while and just hadn't taken the > time. I've sucked down today's copies (20080205) and I see in "stable" the hack for the IPv6 AF. I don't think that solves the problem in that it looks as if there is a failure to create an IPv6 socket, no attempt at IPv4 is made, nor does it seem to loop through alternate addresses (as you noted). In looking at the "current" version, I note the comment at lines 31-34 indicating that "we should probably ... rotate through the address[es] when one fails ...." It looks as if what I have been saying is in fact a variation of that - in that at least one should try at least one address from each AF before failing the connection attempt. Function "hostIpAddr()" does seem to process multiple addresses in an AF-independent way and do so periodically, and "hostIpFailed()" provides for cycling through them. HOWEVER, in "cxnConnect()", we don't seem to rotate through the addresses where there is a "can't create socket" or a "can't set socket non-blocking" error by calling "hostIpFailed(cxn->myHost)" and I think we need to - else we repeatedly try the same AF+address that failed the last time - in a virtual infinite loop if it never succeeds (such as trying an IPv6 address returned by the resolver on an IPv4-only kerneled host). I don't know if we need the "hostIpFailed()" call in the "newEndPoint" conditional (about line 552) of "cxnConnect()" also, but I would suspect so. My suggestion: Add a "hostIpFailed(cxn->myHost);" statement to the "then" clauses of the conditionals at lines 519, 529, and 552 of "innfeed/connection.c". The conditional at line 541 already has it in its "then" clause. What does my suggestion do: It makes innfeed try the next address available upon ANY failure to establish a connection (other than "no addresses available" [line 512] or "connection in bad state" [line 491]). Without the suggestion, it looks as if at least two types of failures will be repeated with the SAME address forever.
Technical Details
Message-ID:
<foaqf4$jnr$1@snarked.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!news.linkpendium.com!news.linkpendium.com!news.snarked.org!not-for-mailReferences:
<fnqsnb$e8h$1@snarked.org> <fo82tr$14d$1@bongo.bofh.it> <fo8pcb$nkd$1@snarked.org> <87ejbs0ytv.fsf@windlord.stanford.edu> <fo8uhn$o2q$1@snarked.org> <87odavzzlq.fsf@windlord.stanford.edu> <fo93cm$oik$1@snarked.org> <87prvbyhy9.fsf@windlord.stanford.edu> <fo969n$qhl$1@snarked.org> <87fxw71bi4.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <foaqf4$jnr$1@snarked.org> Subject: Re: Regarding INN - name to address resolution for peers Date: Tue, 5 Feb 2008 15:11:24 -0800 From: "D. Stussy" <spam@bde-arc.ampr.org> References: <fnqsnb$e8h$1@snarked.org> <fo82tr$14d$1@bongo.bofh.it> <fo8pcb$nkd$1@snarked.org> <87ejbs0ytv.fsf@windlord.stanford.edu> <fo8uhn$o2q$1@snarked.org> <87odavzzlq.fsf@windlord.stanford.edu> <fo93cm$oik$1@snarked.org> <87prvbyhy9.fsf@windlord.stanford.edu> <fo969n$qhl$1@snarked.org> <87fxw71bi4.fsf@windlord.stanford.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!news.linkpendium.com!news.linkpendium.com!news.snarked.org!not-for-mail Newsgroups: news.software.nntp Lines: 68 Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org> NNTP-Posting-Host: pool-71-160-235-237.lsanca.dsl-w.verizon.net X-Trace: snarked.org 1202253095 20219 71.160.235.237 (5 Feb 2008 23:11:35 GMT) X-Complaints-To: newsmaster@snarked.org NNTP-Posting-Date: Tue, 5 Feb 2008 23:11:35 +0000 (UTC) X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478