Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion openvpn/client/win/cmdagent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ class WinCommandAgent : public TunWin::SetupFactory
os << "TAP handle: " << tap_handle_hex << std::endl;
const HANDLE h = BufHex::parse<HANDLE>(tap_handle_hex, "TAP handle");

tap_.guid = json::get_string(jres, "adapter_guid");
tap_.index = (DWORD)json::get_int(jres, "adapter_index");
tap_.name = json::get_string(jres, "adapter_name");

Expand Down Expand Up @@ -220,8 +221,9 @@ class WinCommandAgent : public TunWin::SetupFactory
}
else
{
jreq["adapter_name"] = tap_.name;
jreq["adapter_guid"] = tap_.guid;
jreq["adapter_index"] = Json::Int(tap_.index);
jreq["adapter_name"] = tap_.name;
}

jreq["allow_local_dns_resolvers"] = config->allow_local_dns_resolvers;
Expand Down
2 changes: 2 additions & 0 deletions openvpn/ovpnagent/win/ovpnagent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ class MyClientInstance : public WS::Server::Listener::Client
jout["tap_handle_hex"] = parent()->get_remote_tap_handle_hex();

auto tap = parent()->get_adapter_state();
jout["adapter_guid"] = tap.guid;
jout["adapter_index"] = Json::Int(tap.index);
jout["adapter_name"] = tap.name;

Expand Down Expand Up @@ -710,6 +711,7 @@ class MyClientInstance : public WS::Server::Listener::Client
TunWin::Util::TapNameGuidPair tap;
if (tun_type == TunWin::OvpnDco)
{
tap.guid = json::get_string(root, "adapter_guid");
tap.index = (DWORD)json::get_int(root, "adapter_index");
tap.name = json::get_string(root, "adapter_name");
}
Expand Down