[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
Tue Oct 18 18:00:01 UTC 2016


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

Comment (by lofesa):

 Hi @dd32
 Sorry for the delay.
 the ipv6 config files are:

 /etc/sysconfig/network-scripts/ifcfg-eth0

 TYPE="Ethernet"
 BOOTPROTO=none
 DEFROUTE="yes"
 IPV4_FAILURE_FATAL="no"
 NAME="eth0"
 #UUID=""
 DEVICE="eth0"
 ONBOOT="yes"
 IPADDR= adress
 PREFIX=24
 GATEWAY=adress
 #DNS1=adress
 #DNS2=adress
 PEERDNS=no

 #IPV&-config
 IPV6INIT="yes"
 #IPV6_PEERDNS=yes
 #IPV6_AUTOCONF="yes"
 IPV6_PEERROUTES=yes
 IPV6_DEFROUTE="yes"
 IPV6_FAILURE_FATAL="no"
 IPV6ADDR="adrees/64"
 IPV6_DEFAULTGW="fe80::1%eth0"
 IPV6_DEFAULTDEV=eth0

 NM_CONTROLLED=no

 # Generated by NetworkManager
 options inet6
 options timeout 1
 search domain
 nameserver 8.8.8.8
 nameserver ipv6 address
 nameserver ipv6 address
 nameserver address
 nameserver address
 nameserver address
 nameserver address
 nameserver ipv6 address
 nameserver address
 nameserver address
 nameserver address
 nameserver address
 nameserver address
 nameserver address
 nameserver ipv6 address
 nameserver ipv6 address
 nameserver ipv6 address
 nameserver ipv6 address
 options rotate

 coment the lines, in resolv.conf, relatives to ipv6 do the work.

 need more info?

 We received messages that a plugin need to be updated or a translation
 too, but the download fails.

 I disabled all ipv6 stuff (dns AAAA records, resolv.conf and device
 config) thus they worked, then re-enable all the ipv6 and comment the
 lines in resolv.conf and worked again.

 Whit this script I can reproduce the issue:

 <?php

 $host = 'download.wordpress.org';
 $host1 = 'downloads.wordpress.org';
 $ip = gethostbyname($host);
 $ip1 = gethostbyname($host1);
 $info = gethostbynamel($host1);
 echo $host."\n";
 echo $ip."\n";
 echo $host1."\n";
 echo $ip1;
 echo json_encode($info);
 ?>

 download.wordpress.org always returns 66.155.40.250

 downloads.wordpress.org returns

 66.155.40.186["66.155.40.188","66.155.40.187","66.155.40.186","66.155.40.189"]
 or

 0.0.0.0["0.0.0.0","0.0.0.0","0.0.0.0","0.0.0.0"] if the line options inet6
 is uncommented in resolv.conf.

 the option you suggest don´t do the trick.

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


More information about the wp-trac mailing list