diff --git a/mythtv/libs/libmythbase/mythcorecontext.cpp b/mythtv/libs/libmythbase/mythcorecontext.cpp
index 9154292..69e535b 100644
|
a
|
b
|
|
| 2 | 2 | #include <QUrl> |
| 3 | 3 | #include <QDir> |
| 4 | 4 | #include <QFileInfo> |
| | 5 | #include <QFile> |
| 5 | 6 | #include <QDebug> |
| 6 | 7 | #include <QMutex> |
| 7 | 8 | #include <QWaitCondition> |
| … |
… |
bool MythCoreContext::Init(void)
|
| 223 | 224 | "(such as 'en_US.UTF-8').").arg(lang_variables)); |
| 224 | 225 | #endif |
| 225 | 226 | |
| 226 | | // If any of the IPs on any interfaces look like IPv6 addresses, assume IPv6 |
| | 227 | // If a routable IPv6 address is configured on any interface, assume IPv6 |
| 227 | 228 | // is available |
| 228 | 229 | QNetworkInterface qtinterface; |
| 229 | 230 | QList<QHostAddress> IpList = qtinterface.allAddresses(); |
| 230 | 231 | for (int i = 0; i < IpList.size(); i++) |
| 231 | 232 | { |
| 232 | | if (IpList.at(i).toString().contains(":")) |
| | 233 | QString test6 = IpList.at(i).toString(); |
| | 234 | if (test6.contains(":") && !test6.startsWith("0:0:0:0:0:0:0:") && |
| | 235 | !test6.startsWith("FE80:")) |
| 233 | 236 | { |
| | 237 | #ifdef linux |
| | 238 | QString bindv6only = "/proc/sys/net/ipv6/bindv6only"; |
| | 239 | QFile file(bindv6only); |
| | 240 | if (file.open(QFile::ReadOnly)) |
| | 241 | { |
| | 242 | QString line(file.readLine(2)); |
| | 243 | if (line[0] != '0') |
| | 244 | { |
| | 245 | LOG(VB_GENERAL, LOG_ERR, LOC + |
| | 246 | QString("Error, net.ipv6.bindv6only = %1. " |
| | 247 | "MythTV requires this to be set to 0. " |
| | 248 | "Try looking in /etc/sysctl.d/* files.") |
| | 249 | .arg(line)); |
| | 250 | } |
| | 251 | } |
| | 252 | else |
| | 253 | { |
| | 254 | LOG(VB_GENERAL, LOG_ERR, LOC + |
| | 255 | QString("Unable to read %1").arg(bindv6only)); |
| | 256 | } |
| | 257 | file.close(); |
| | 258 | #endif // linux |
| 234 | 259 | d->m_hasIPv6 = true; |
| 235 | 260 | break; |
| 236 | 261 | } |