parent
9f82b4c21f
commit
e646b85e56
29 changed files with 512 additions and 56 deletions
|
|
@ -251,6 +251,19 @@ bool Daemon::parseConfig(const QJsonObject& obj, InterfaceConfig& config) {
|
|||
GETVALUE("serverPskKey", config.m_serverPskKey, String);
|
||||
GETVALUE("serverPort", config.m_serverPort, Double);
|
||||
|
||||
if (!obj.contains("deviceMTU") || obj.value("deviceMTU").toString().toInt() == 0)
|
||||
{
|
||||
config.m_deviceMTU = 1420;
|
||||
} else {
|
||||
config.m_deviceMTU = obj.value("deviceMTU").toString().toInt();
|
||||
#ifdef Q_OS_WINDOWS
|
||||
// For Windows min MTU value is 1280 (the smallest MTU legal with IPv6).
|
||||
if (config.m_deviceMTU < 1280) {
|
||||
config.m_deviceMTU = 1280;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
config.m_deviceIpv4Address = obj.value("deviceIpv4Address").toString();
|
||||
config.m_deviceIpv6Address = obj.value("deviceIpv6Address").toString();
|
||||
if (config.m_deviceIpv4Address.isNull() &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue