This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [ping2][PATCH] Fix incorrect getaddrinfo assertion trigger
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Allan McRae <allan at archlinux dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 17 Oct 2013 13:19:13 +0200
- Subject: Re: [ping2][PATCH] Fix incorrect getaddrinfo assertion trigger
- Authentication-results: sourceware.org; auth=none
- References: <1377864323-14828-1-git-send-email-allan at archlinux dot org> <52395ED0 dot 80908 at archlinux dot org> <525DFBF4 dot 5010302 at archlinux dot org>
On Wed, Oct 16, 2013 at 12:37:40PM +1000, Allan McRae wrote:
> Ping!
>
> On 18/09/13 18:05, Allan McRae wrote:
> > Ping.
> >
> > On 30/08/13 22:05, Allan McRae wrote:
> >> [BS #9954]
> >>
> >> With the following /etc/hosts:
> >> 127.0.0.1 www.my-domain.es
> >> 127.0.1.1 www.my-domain.es
> >> 192.168.0.1 www.my-domain.es
> >>
> >> Using getaddrinfo() on www.my-domain.es, trigger the following assertion:
> >> ../sysdeps/posix/getaddrinfo.c:1473: rfc3484_sort: Assertion
> >> `src->results[i].native == -1 || src->results[i].native == a1_native' failed.
> >>
> >> This is due to two different bugs:
> >> - In rfc3484_sort() rule 7, src->results[i].native is assigned even if
> >> src->results[i].index is -1, meaning that no interface is associated.
> >> - In getaddrinfo() the source IP address used with the lo interface needs a
> >> special case, as it can be any IP within 127.X.Y.Z.
> >>
> >> ---
> >>
> >> This is a patch taken from bugzilla. I can not replicate it myself, even
> >> with the attached testcase on bugzilla. However, I have users reporting this
> >> issue that also can confirm this patch fixes the assertions for them. I
> >> believe this patch is widely used by other distributions (at least Debian
> >> and Fedora).
> >>
I am ok with this patch. Unless there is a reason that this patch will
make code worse keeping code in sync with distributions will reduce number of
unique bugs.
> >> There is a negative comment by Ulrich here:
> >> https://sourceware.org/bugzilla/show_bug.cgi?id=9954#c2
> >>
> >> I think that comment is partially correct, in that it is hiding a bug from
> >> a faulty DNS provider, in which case this patch is correct in that it
> >> improves robustness. That is why this bug does not affect most people.
> >> However, I am not fully confident about that assessment...
> >>
> >> Can anyone replicate or confirm/correct my reasoning why most people can
> >> not replicate?
> >>