mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-20 02:00:55 +07:00
fix: solve infinite reconnect NM down
This commit is contained in:
@@ -237,7 +237,11 @@ bool WireguardUtilsLinux::updatePeer(const InterfaceConfig& config) {
|
|||||||
// Exclude the server address, except for multihop exit servers.
|
// Exclude the server address, except for multihop exit servers.
|
||||||
if ((config.m_hopType != InterfaceConfig::MultiHopExit) &&
|
if ((config.m_hopType != InterfaceConfig::MultiHopExit) &&
|
||||||
(m_rtmonitor != nullptr)) {
|
(m_rtmonitor != nullptr)) {
|
||||||
m_rtmonitor->addExclusionRoute(IPAddress(config.m_serverIpv4AddrIn));
|
if (!config.m_serverIpv4AddrIn.isEmpty() &&
|
||||||
|
!m_rtmonitor->addExclusionRoute(IPAddress(config.m_serverIpv4AddrIn))) {
|
||||||
|
logger.error() << "No gateway — cannot add server exclusion route";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
m_rtmonitor->addExclusionRoute(IPAddress(config.m_serverIpv6AddrIn));
|
m_rtmonitor->addExclusionRoute(IPAddress(config.m_serverIpv6AddrIn));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user