Bug 13473 - net ads dns gethostbyname misses IPv6 support
Summary: net ads dns gethostbyname misses IPv6 support
Status: RESOLVED DUPLICATE of bug 13706
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: DNS server (internal) (show other bugs)
Version: 4.8.2
Hardware: All All
: P5 minor (vote)
Target Milestone: ---
Assignee: Kai Blin
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-13 18:14 UTC by Timur Bakeyev
Modified: 2020-12-22 20:15 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timur Bakeyev 2018-06-13 18:14:20 UTC
The `net` command has a subcommand:

net ads dns gethostbyname   Look up host in the AD

Somehow that command performs only IPv4 queries, leaving IPv6 out of the scope:

# host dawnstrider.samba.in
dawnstrider.samba.in has address 10.10.0.21
dawnstrider.samba.in has IPv6 address 2002:453:e6ac:2180::21

# net ads dns gethostbyname 10.10.0.20 dawnstrider.samba.in
10.10.0.21

As we trying to support IPv6 and all the levels of the Samba I think it's reasonable to add IPv6 support here. That would be also more in line with the conventional `gethostbyname()` function, which understands both IPv4 and IPv6 addresses:

The gethostbyname() function returns a structure of type hostent for the given host name. Here name is either a hostname, or an IPv4 address in standard dot notation (as for inet_addr(3)), or an IPv6 address in colon (and possibly dot) notation. (See RFC 1884 for the description of IPv6 addresses.) If name is an IPv4 or IPv6 address, no lookup is performed and gethostbyname() simply copies name into the h_name field and its struct in_addr equivalent into the h_addr_list[0] field of the returned hostent structure.
Comment 1 Björn Jacke 2020-12-22 20:15:42 UTC

*** This bug has been marked as a duplicate of bug 13706 ***