Lines 46-51
Link Here
|
46 |
#include "Store.h" |
46 |
#include "Store.h" |
47 |
#include "icmp/net_db.h" |
47 |
#include "icmp/net_db.h" |
48 |
#include "ip/IpAddress.h" |
48 |
#include "ip/IpAddress.h" |
|
|
49 |
#include "ip/tools.h" |
49 |
|
50 |
|
50 |
/* count mcast group peers every 15 minutes */ |
51 |
/* count mcast group peers every 15 minutes */ |
51 |
#define MCAST_COUNT_RATE 900 |
52 |
#define MCAST_COUNT_RATE 900 |
Lines 1387-1392
Link Here
|
1387 |
|
1388 |
|
1388 |
IpAddress temp(getOutgoingAddr(NULL,p)); |
1389 |
IpAddress temp(getOutgoingAddr(NULL,p)); |
1389 |
|
1390 |
|
|
|
1391 |
// if IPv6 is disabled try to force IPv4-only outgoing. |
1392 |
if (!Ip::EnableIpv6 && !temp.SetIPv4()) { |
1393 |
debugs(50, DBG_IMPORTANT, "WARNING: IPv6 is disabled. Failed to use " << temp << " to probe " << p->host); |
1394 |
return ret; |
1395 |
} |
1396 |
|
1397 |
// if IPv6 is split-stack, prefer IPv4 |
1398 |
if (Ip::EnableIpv6&IPV6_SPECIAL_SPLITSTACK) { |
1399 |
// NP: This is not a great choice of default, |
1400 |
// but with the current Internet being IPv4-majority has a higher success rate. |
1401 |
// if setting to IPv4 fails we dont care, that just means to use IPv6 outgoing. |
1402 |
temp.SetIPv4(); |
1403 |
} |
1404 |
|
1390 |
fd = comm_open(SOCK_STREAM, IPPROTO_TCP, temp, COMM_NONBLOCKING, p->host); |
1405 |
fd = comm_open(SOCK_STREAM, IPPROTO_TCP, temp, COMM_NONBLOCKING, p->host); |
1391 |
|
1406 |
|
1392 |
if (fd < 0) |
1407 |
if (fd < 0) |