[wp-trac] [WordPress Trac] #38291: gethostbyname() at wp-includes/http.php don´t work if host is ipv6 configured

WordPress Trac noreply at wordpress.org
Wed Oct 19 11:00:13 UTC 2016


#38291: gethostbyname() at wp-includes/http.php don´t work if host is ipv6
configured
--------------------------+------------------------------
 Reporter:  lofesa        |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  HTTP API      |     Version:  4.6.1
 Severity:  normal        |  Resolution:  invalid
 Keywords:  close         |     Focuses:
--------------------------+------------------------------
Changes (by lofesa):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Hi @dd32

 I tried to comment these line (search domain) and put "search ." too,
 result are the same, when "options inet6" is uncommented.

 In other hand, I tried to use gethostbyname6 and gethostbynamel6,
 referenced [https://forums.phpfreaks.com/topic/157824-gethostbyname-for-
 ipv6/] with $try_a to true and it work, no matter if "options inet6" is
 present or not.

 I don´t have any other dns configuration other than /etc/resolv.conf

 Perhaps test for an A dns record is needed?



 Replying to [comment:9 dd32]:
 > > `search domain`
 >
 > Assuming `domain` is your actual domain, and you have a wildcard DNS in
 place on that domain, I think that's the source of your issue.
 >
 > I kind-of duplicated it with that configuration (for reference, I use
 `search .` normally) with `ping6 api.wordpress.org` which should show an
 `unknown host` error but will probably reference your local IPv6 address
 instead.
 >
 > With the info you've given there, it's most definitely some kind of
 failure in the local DNS configuration, if enabling ipv6 causes dns
 queries to fail, there's not much we can do about it in WordPress.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38291#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list