!10 解决因有线连接没有指定网卡造成的VPN崩溃问题

Merge pull request !10 from chenxuechao/openkylin/yangtze-fork
This commit is contained in:
zhaoshixu 2022-10-21 08:49:23 +00:00 committed by Gitee
commit 2f9c41d0c5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 10 additions and 2 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
kylin-nm (3.14.0.0+0512-2k11) v101; urgency=medium
* 修改因有线连接未指定网卡造成VPN托盘崩溃的问题
-- zhaoshixu <zhaoshixu@kylinos.cn> Fri, 21 Oct 2022 16:35:19 +0800
kylin-nm (3.14.0.0+0512-2k10) v101; urgency=medium kylin-nm (3.14.0.0+0512-2k10) v101; urgency=medium
* 托盘vpn需求 * 托盘vpn需求

View File

@ -194,8 +194,10 @@ void KyConnectResourse::getVpnAndVirtualConnections(QList<KyConnectItem *> &conn
} }
NetworkManager::Device::Ptr devicePtr = nullptr; NetworkManager::Device::Ptr devicePtr = nullptr;
devicePtr = m_networkResourceInstance->findDeviceInterface(connectPtr->settings()->interfaceName()); devicePtr = m_networkResourceInstance->findDeviceInterface(connectPtr->settings()->interfaceName());
if (NetworkManager::ConnectionSettings::ConnectionType::Wired == connectPtr->settings()->connectionType() && !devicePtr->udi().startsWith("/sys/devices/virtual/net")) { if (NetworkManager::ConnectionSettings::ConnectionType::Wired == connectPtr->settings()->connectionType()) {
continue; if (devicePtr == nullptr || !devicePtr->udi().startsWith("/sys/devices/virtual/net")) {
continue;
}
} }
QString devName = ""; QString devName = "";
if (!devicePtr.isNull()) { if (!devicePtr.isNull()) {