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

Pandey, Utkarsh Utkarsh.Pandey at Honeywell.com
Thu Aug 3 08:46:07 CEST 2017


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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170803/e14a1498/attachment.html>


More information about the Interest mailing list