QNetworkConfigurationManager does not recognise active wireless network when Cisco AnyConnect secure mobility client is enabled



  • Hi,
    The issue I had been facing is - QNetworkConfigurationManager does not recognise active wireless network when Cisco AnyConnect secure mobility client(http://www.cisco.com/c/en/us/products/security/anyconnect-secure-mobility-client/index.html?stickynav=1) is enabled on my system. The QNetworkConfigurationManager detects the wired network but not the wireless. Also, when i try to connect to the wireless using VPN connection,
    then the QNetworkConfigurationManager detects it. I have recently migrated my application code from Qt 5.4 to Qt 5.9.1.The application works as intended on Qt 5.4,
    but not on Qt 5.9.1.

    Please find the code snippet as below,may be of some help.
    void CNetworkConnectionCheck::checkNetworkConnection()
    {
    m_bIsConnected = false;
    QNetworkConfigurationManager nwkMgr;
    QList<QNetworkConfiguration> activeConfigs = nwkMgr.allConfigurations(QNetworkConfiguration::Active);
    qDebug() << activeConfigs.count();
    if(activeConfigs.count() > 0 && nwkMgr.isOnline())
    {
    foreach(QNetworkConfiguration activeConfig, activeConfigs)
    {
    QNetworkSession session(activeConfig);
    if(session.state() == QNetworkSession::Connected)
    {
    m_bIsConnected = true;
    break;
    }
    }
    if(m_bIsConnected)
    setSSID();
    }
    else
    {
    m_bIsConnected = false;
    }
    }

    Here, CNetworkConnectionCheck is derived from QThread Class. activeConfigs.count() returns as 0 everytime when cisco anyConnect secure mobility client is enabled on the system.

    Can anyone please help to resolve the issue.
    Thanks.


  • Lifetime Qt Champion

    Hi,

    Please don't post the exact same question on multiple sub-forum. One is enough.

    Duplicate

    Closing this one.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.