πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #79035

Re: Another bug

#79035
From: D. Stussy
Date: Wed, 14 May 2008 22:01
48 lines
3087 bytes
"Julien Γ‰LIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:g0f9m2$6oj$1@news.trigofacile.com...
> Miquel van Smoorenburg found the problem:
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> It's standard getaddrinfo() behaviour. It returns the same address
> three times .. a small test program that prints the return
> values of getaddrinfo shows:
>
> $ ./getaddrinfo feeder.erje.net
> family: 2, socktype: 1, protocol: 6
> family: 2, socktype: 2, protocol: 17
> family: 2, socktype: 3, protocol: 0
>
> (that's protocol TCP, UDP, and IP)

>From the man page:  "... or if the same service is available from multiple
socket protocols (one  SOCK_STREAM  address  and another SOCK_DGRAM address,
for example)."

I missed that too.  Grrrr!

> ...
> #---------------- innfeed-host-thrice-fix.diff ---------------
> diff -ruN inn-2.4.4.orig/innfeed/host.c inn-2.4.4/innfeed/host.c
> --- inn-2.4.4.orig/innfeed/host.c 2008-05-05 12:18:36.000000000 +0200
> +++ inn-2.4.4/innfeed/host.c 2008-05-14 14:06:18.000000000 +0200
> @@ -1158,6 +1158,7 @@
>
>        memset(&hints, 0, sizeof(hints));
>        hints.ai_family = family ? family : AF_UNSPEC;
> +      hints.ai_socktype = SOCK_STREAM;
>  #ifdef AI_ADDRCONFIG
>        hints.ai_flags = AI_ADDRCONFIG;
>  #endif
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> I will commit it as soon as possible.  Therefore, the problem will not
> be happening again in STABLE snapshots.
> Thanks for having seen it.

Too bad this didn't make it into the official inn-2.4.4 release yesterday.

Although not absolutely needed, I wonder if "hints.ai_protocol" should
specify TCP (6) also - just for completeness?  If the function were expanded
to return data from other AFs (e.g. "AX.25" which has both a datagram and
connected/stream modes) in the future, ....


Technical Details
Message-ID: <g0fnf5$v4g$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!news.alt.net!news-xfer.nntp.sonic.net!news.snarked.org!not-for-mail
References: <fvt1bf$qug$1@snarked.org> <g0aoo6$op9$1@snarked.org> <g0cqcn$kt6$1@news.trigofacile.com> <g0dbe2$f87$1@snarked.org> <g0f9m2$6oj$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <g0fnf5$v4g$1@snarked.org>
Subject: Re: Another bug
Date: Wed, 14 May 2008 15:01:07 -0700
From: "D. Stussy" <spam@bde-arc.ampr.org>
References: <fvt1bf$qug$1@snarked.org> <g0aoo6$op9$1@snarked.org> <g0cqcn$kt6$1@news.trigofacile.com> <g0dbe2$f87$1@snarked.org> <g0f9m2$6oj$1@news.trigofacile.com>
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!news.alt.net!news-xfer.nntp.sonic.net!news.snarked.org!not-for-mail
Newsgroups: news.software.nntp
Lines: 48
Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org>
NNTP-Posting-Host: pool-71-118-49-180.lsanca.dsl-w.verizon.net
X-Trace: snarked.org 1210802469 31888 71.118.49.180 (14 May 2008 22:01:09 GMT)
X-Complaints-To: newsmaster@snarked.org
NNTP-Posting-Date: Wed, 14 May 2008 22:01:09 +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