RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1850685 - Negative response notification is inconsistent when using "host"
Summary: Negative response notification is inconsistent when using "host"
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: bind
Version: 8.2
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: aegorenk
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 1771008
TreeView+ depends on / blocked
 
Reported: 2020-06-24 17:35 UTC by Lucas Caparelli
Modified: 2024-03-25 16:05 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-16 13:55:28 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Internet Systems Consortium (ISC) isc-projects bind9 issues 1975 0 None None None 2020-06-26 09:05:21 UTC

Description Lucas Caparelli 2020-06-24 17:35:07 UTC
Description of problem:

When not using the "-t" flag it is assumed the user only cares about A, AAAA and MX resource records. If the user queries a name which is linked to another type of record, but not these "default" records there is no NXDOMAIN message, which can be confusing.

For example, if the name "2.0.168.192.in-addr.arpa" is associated with a PTR record and has no A, AAAA or MX records, there will be no output:

=====
[root@rhel82 ~]# host -t ANY 2.0.168.192.in-addr.arpa
2.0.168.192.in-addr.arpa domain name pointer foo.example.lab.com.
[root@rhel82 ~]# host 2.0.168.192.in-addr.arpa
[root@rhel82 ~]# 
=====

But if we query a name which has no records at all we get the expected NXDOMAIN response:

=====
[root@rhel82 ~]# host -t ANY 1.0.168.192.in-addr.arpa
Host 1.0.168.192.in-addr.arpa not found: 3(NXDOMAIN)
[root@rhel82 ~]# host 1.0.168.192.in-addr.arpa
Host 1.0.168.192.in-addr.arpa not found: 3(NXDOMAIN)
=====

Version-Release number of selected component (if applicable): bind-utils-9.11.13-5.el8_2.x86_64


How reproducible: always


Steps to Reproduce:
1. Configure a zone with a single PTR record:

=====
[root@rhel82 ~]# tail -n7 /etc/named.conf 
zone "0.168.192.in-addr.arpa" IN {
	type master;
	file "0.168.192.in-addr.arpa.hosts";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
[root@rhel82 ~]# cat /var/named/0.168.192.in-addr.arpa.hosts 
$TTL 86400
@     IN   SOA lab.com. root.lab.com. (  
              2020062401 ; Serial  
                    3600 ; Refresh  
                     900 ; Retry  
                  604800 ; Expire  
                    3600 )  ; Minimum  
     IN      NS         rhel82.lab.com.  
2    IN      PTR        foo.example.lab.com.
=====

2. Restart named

3. Perform a query using "host" without specifying the "-t" flag (implies we only care about A, AAAA and MX records). Make sure to query a name that is associated with another type of record (i.e., not A, AAAA or MX).

Actual results:

We get no output.

=====
[root@rhel82 ~]# host -t ANY 2.0.168.192.in-addr.arpa
2.0.168.192.in-addr.arpa domain name pointer foo.example.lab.com.
[root@rhel82 ~]# host 2.0.168.192.in-addr.arpa
[root@rhel82 ~]# 
=====

Expected results:

We get a NXDOMAIN response

Additional info:

I am not sure if this is any different upstream, but I'm assuming it isn't.

Comment 1 Petr Menšík 2020-06-26 08:20:43 UTC
I am sure upstream has the same issue, host is not modified significantly.

It is worth mentioning, it can provide feedback for any manually specified type:

host -t a 50.205.31.217.in-addr.arpa
50.205.31.217.in-addr.arpa has no A record
host -t mx 50.205.31.217.in-addr.arpa
50.205.31.217.in-addr.arpa has no MX record

But it does not output just anything, when just NOERROR status is returned always

host 50.205.31.217.in-addr.arpa

I think that deserves upstream issue.

Comment 2 aegorenk 2020-07-26 11:22:37 UTC
Patch sent to upstream
https://gitlab.isc.org/isc-projects/bind9/-/issues/1975#note_149351

Comment 4 aegorenk 2020-12-16 13:55:28 UTC
Showing "NXDOMAIN message" in this case is incorrect since this is what RFC 1035 says about that RCODE:

RCODE           Response code - this 4 bit field is set as part of
                responses.  The values have the following
                interpretation:

........................................................................

                3               Name Error - Meaningful only for
                                responses from an authoritative name
                                server, this code signifies that the
                                domain name referenced in the query does
                                not exist.
........................................................................

In the provided example requested domain name exists.

We communicated with the upstream and proposed the change providing the patch to display some information in this case, but the upstream rejected the change.

The argumentation they provide can be found here:
https://gitlab.isc.org/isc-projects/bind9/-/issues/1975#note_149351

The upstream recommends using "dig" instead of "host".


Note You need to log in before you can comment on or make changes to this bug.