Compare commits
3 commits
dev
...
bugfix/win
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75d5b73e2f | ||
|
|
25f7356a1a | ||
|
|
764d432453 |
2 changed files with 10 additions and 3 deletions
|
|
@ -31,7 +31,9 @@ IPUtilsLinux::~IPUtilsLinux() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IPUtilsLinux::addInterfaceIPs(const InterfaceConfig& config) {
|
bool IPUtilsLinux::addInterfaceIPs(const InterfaceConfig& config) {
|
||||||
return addIP4AddressToDevice(config) && addIP6AddressToDevice(config);
|
bool ret = addIP4AddressToDevice(config);
|
||||||
|
addIP6AddressToDevice(config);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IPUtilsLinux::setMTUAndUp(const InterfaceConfig& config) {
|
bool IPUtilsLinux::setMTUAndUp(const InterfaceConfig& config) {
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,6 @@
|
||||||
|
|
||||||
#include "leakdetector.h"
|
#include "leakdetector.h"
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
#include "platforms/windows/windowscommons.h"
|
|
||||||
#include "windowsdaemon.h"
|
|
||||||
#include "windowsfirewall.h"
|
#include "windowsfirewall.h"
|
||||||
|
|
||||||
#pragma comment(lib, "iphlpapi.lib")
|
#pragma comment(lib, "iphlpapi.lib")
|
||||||
|
|
@ -269,6 +267,13 @@ bool WireguardUtilsWindows::updateRoutePrefix(const IPAddress& prefix) {
|
||||||
if (result == ERROR_OBJECT_ALREADY_EXISTS) {
|
if (result == ERROR_OBJECT_ALREADY_EXISTS) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Case for ipv6 route with disabled ipv6
|
||||||
|
if (prefix.address().protocol() == QAbstractSocket::IPv6Protocol
|
||||||
|
&& result == ERROR_NOT_FOUND) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (result != NO_ERROR) {
|
if (result != NO_ERROR) {
|
||||||
logger.error() << "Failed to create route to"
|
logger.error() << "Failed to create route to"
|
||||||
<< prefix.toString()
|
<< prefix.toString()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue