mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Tarun Johar  <tjohar@totalphase.com>
To: Natanael Copa <ncopa@alpinelinux.org>,
	Florian Weimer <fweimer@redhat.com>
Cc: musl@lists.openwall.com
Subject: Re: DNS resolver patch
Date: Thu, 6 Dec 2018 11:36:01 -0800 (PST)	[thread overview]
Message-ID: <1956158595.3040187.1544124961290.JavaMail.zimbra@totalphase.com> (raw)
In-Reply-To: <2098747028.3039150.1544122224835.JavaMail.zimbra@totalphase.com>

[-- Attachment #1: Type: text/plain, Size: 2598 bytes --]

I managed to add the proposed fixes to https://www.virtualbox.org/ticket/18171 as comment. Hopefully, this helps our cause. 

Thanks, 
Tarun 

----- Original Message -----

From: "Tarun Johar" <tjohar@totalphase.com> 
To: "Natanael Copa" <ncopa@alpinelinux.org>, "Florian Weimer" <fweimer@redhat.com> 
Cc: musl@lists.openwall.com 
Sent: Friday, December 7, 2018 12:20:24 AM 
Subject: Re: [musl] DNS resolver patch 

Hi Natanael/Florian, 

A couple of solutions for this are stated below. 

The code is in src/VBox/Devices/Network/slirp/hostres.c :517 

if ( qtype != Type_A 
&& qtype != Type_CNAME 
&& qtype != Type_PTR 
&& qtype != Type_ANY) 
{ 
LogErr(("NAT: hostres: unsupported qtype %d\n", qtype)); 
return refuse(res, RCode_NotImp); 
} 

There are two possible fixes: 

- Add a conditional above this code for Type_AAAA where the resolver returns RCode_NXDomain instead of RCode_NotImp: 

if (qtype == Type_AAAA) { 
LogErr(("NAT: hostres: cannot resolve qtype %d\n", qtype)); 
return refuse(res, RCode_NXDomain); 
} 

- Implement IPv6 resolution for AAAA records. The resolve() function at line 574 would need to be updated. 

I just came across ticket filed by Natanael with Virtual box at https://www.virtualbox.org/ticket/18171 . Since one of us is already talking with them, could you propose the above solutions to them (and add me to the loop at well). 

Thanks, 
Tarun 

----- Original Message -----

From: "Natanael Copa" <ncopa@alpinelinux.org> 
To: "Florian Weimer" <fweimer@redhat.com> 
Cc: musl@lists.openwall.com, "Tarun Johar" <tjohar@totalphase.com> 
Sent: Thursday, December 6, 2018 9:18:20 PM 
Subject: Re: [musl] DNS resolver patch 

On Thu, 06 Dec 2018 15:53:43 +0100 
Florian Weimer <fweimer@redhat.com> wrote: 



* Tarun Johar: 

> The VirtualBox --natdnsresolver does not support IPv6 AAAA address 
> queries. It returns "NotImp" (code 4) for such queries. 

I think that's not the only bug, and glibc fails to work around all of 
them. We occasionally get bug reports about DNS resolution issues under 
VirtualBox, too. Oracle really needs to fix this properly. 

Thanks, 
Florian 

Problem is here: 



https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Devices/Network/slirp/hostres.c?rev=59202#L408 

402 if ( qtype != Type_A 
403 && qtype != Type_CNAME 
404 && qtype != Type_PTR 
405 && qtype != Type_ANY) 
406 { 
407 LogErr(("NAT: hostres: unsupported qtype %d\n", qtype)); 
408 return refuse(pData, m, RCode_NotImp); 
409 } 


They should return RCode_NXDomain instead of RCode_NotImp. Seems like 
they also have more of those invalid use of NotImp. 

-nc 


[-- Attachment #2: Type: text/html, Size: 5658 bytes --]

      reply	other threads:[~2018-12-06 19:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <882247050.3003099.1544074074084.JavaMail.zimbra@totalphase.com>
2018-12-06  5:31 ` Tarun Johar
2018-12-06 14:13   ` Rich Felker
2018-12-06 15:23     ` Natanael Copa
2018-12-06 14:53   ` Florian Weimer
2018-12-06 15:48     ` Natanael Copa
2018-12-06 18:18       ` Florian Weimer
2018-12-06 18:38         ` A. Wilcox
2018-12-06 19:46           ` Laurent Bercot
2018-12-25  2:06             ` Rich Felker
2018-12-27 19:18               ` Florian Weimer
2018-12-28 17:21                 ` Rich Felker
2019-05-30  8:50                   ` Florian Weimer
2019-05-30 13:54                     ` Rich Felker
2018-12-06 20:36           ` Florian Weimer
2018-12-06 21:01             ` Rich Felker
2018-12-06 18:50       ` Tarun Johar
2018-12-06 19:36         ` Tarun Johar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1956158595.3040187.1544124961290.JavaMail.zimbra@totalphase.com \
    --to=tjohar@totalphase.com \
    --cc=fweimer@redhat.com \
    --cc=musl@lists.openwall.com \
    --cc=ncopa@alpinelinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).