definition of the routing string to be deleted for wg and ikev2 connections
This commit is contained in:
parent
4abfc58ad0
commit
0d0c29493b
8 changed files with 111 additions and 60 deletions
|
|
@ -170,7 +170,7 @@ void Ikev2Protocol::newConnectionStateEventReceived(UINT unMsg, tagRASCONNSTATE
|
|||
//SetEvent(gEvent_handle);
|
||||
{
|
||||
//get the network settings of adapters
|
||||
std::this_thread::sleep_for(std::chrono::seconds(4));
|
||||
std::this_thread::sleep_for(std::chrono::seconds(4));
|
||||
std::string p1,p2,p3;
|
||||
const auto ret = adpInfo.get_adapter_info(tunnelName().toStdString());
|
||||
if (std::get<0>(ret) == false){
|
||||
|
|
@ -183,19 +183,23 @@ void Ikev2Protocol::newConnectionStateEventReceived(UINT unMsg, tagRASCONNSTATE
|
|||
qDebug()<<"My ikev2 m_routeGateway "<<m_routeGateway;
|
||||
qDebug()<<"My ikev2 m_vpnLocalAddress "<<m_vpnLocalAddress;
|
||||
qDebug()<<"My ikev2 m_vpnGateway "<< m_vpnGateway;
|
||||
auto ret = adpinfo::get_route_table();
|
||||
qDebug()<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
|
||||
auto ret = adpinfo::get_route_table(p2.c_str());
|
||||
{
|
||||
for (const auto &itret: ret){
|
||||
const auto ip = std::get<0>(itret);
|
||||
const auto msk = std::get<1>(itret);
|
||||
const auto gw = std::get<2>(itret);
|
||||
const auto itf = std::get<3>(itret);
|
||||
qDebug()<<"IP["<<ip.c_str()<<"]"<<"Mask["<<msk.c_str()<<"]"<<"gateway["<<gw.c_str()<<"]"<<"Interface["<<itf.c_str()<<"]";
|
||||
const auto ip = itret.szDestIp;//std::get<0>(itret);
|
||||
const auto msk = itret.szMaskIp;//std::get<1>(itret);
|
||||
const auto gw = itret.szGatewayIp;//std::get<2>(itret);
|
||||
const auto itf = itret.szInterfaceIp;//std::get<3>(itret);
|
||||
const auto itfInd = itret.ulIfIndex;
|
||||
qDebug()<<"IP["<<ip.c_str()<<"]"<<"Mask["<<msk.c_str()<<"]"<<"gateway["<<gw.c_str()<<"]"<<"Interface["<<itf.c_str()<<"]"<<"Interface index["<<itfInd<<"]";
|
||||
emit route_avaible(QString::fromStdString(ip),
|
||||
QString::fromStdString(msk),
|
||||
QString::fromStdString(gw),
|
||||
QString::fromStdString(itf),
|
||||
itfInd);
|
||||
}
|
||||
|
||||
}
|
||||
qDebug()<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue