add check for route prefix type

This commit is contained in:
Mykola Baibuz 2025-04-16 12:12:18 +03:00
parent 764d432453
commit 25f7356a1a

View file

@ -269,7 +269,8 @@ bool WireguardUtilsWindows::updateRoutePrefix(const IPAddress& prefix) {
}
// Case for ipv6 route with disabled ipv6
if (result == ERROR_NOT_FOUND) {
if (prefix.address().protocol() == QAbstractSocket::IPv6Protocol
&& result == ERROR_NOT_FOUND) {
return true;
}