From: Indira Priyadarshini Thangella <indira@versa-networks.com>
To: "wireguard@lists.zx2c4.com" <wireguard@lists.zx2c4.com>
Subject: Wintun adapter becomes unresponsive or goes into bad state after sending traffic for sometime
Date: Thu, 29 Feb 2024 10:51:08 +0000 [thread overview]
Message-ID: <IA1PR11MB78918BC170A4CB3EF05FB998FF5F2@IA1PR11MB7891.namprd11.prod.outlook.com> (raw)
Hi All,
I'm trying to setup a SSL-TLS based VPN connection. I'm using wintun and able to setup VPN connection and the tunnel comes up fine with my local server within a controlled environment. After the connection is up for sometime and after couple of speedtests(using Ookla), I'm running into a weird issue where I don't see wintunreceive events. It looks like adapter is not able to receive any packets from tunnel interface. At the same time, packets coming from server are not able to be sent to the wintun adapter using WintunSendPacket. Ping requests throw general failures once we hit this issue.
I've two threads one for processing wintun rx packets and the other for wintun tx packets. As I mentioned, I don't see any wintun rx data processing after speedtest. Just to mention, it happens randomly. Sometimes, I hit issue, during the first speedtest itself and sometimes after couple of speedtests but I'm seeing this very often.
Below is a snippet of my wintun tx packet thread handling. Once I hit the issue, I'm constantly hitting else condition where I reset the tun tx event.
HANDLE WaitHandles[] = { sslvpn_inst->tun_tx_event,
sslvpn_inst->wintun_tx_thr_term_ev };
while (1) {
event_result = WaitForMultipleObjects(_countof(WaitHandles), WaitHandles,
FALSE, INFINITE);
switch (event_result) {
case WAIT_OBJECT_0:
if (vs_sslvpn_recv_crit_itc_message(&sslvpn_inst->tun_tx_queue,
&packet, &packet_len) == 0) {
tun_packet = packet;
if (tun_packet != NULL) {
LogVerboseW(__VNFUNCTION__, __VNLINE__, L"VS-SSL> Sending packet to Wintun");
WintunSendPacket(sslvpn_wintun_clnt->session_handle, tun_packet);
}
}
else {
LogVerboseW(__VNFUNCTION__, __VNLINE__, L"VS-SSL> Failed to receive crit_itc_msg. Reset Event handle 0");
ResetEvent(WaitHandles[0]);
}
break;
Did anyone run into this issue? I typically see General failure errors with ping requests once I run into this issue.
However, the ipconfig still shows up the adapter but it just seems like the adapter went into a bad state. Once, I tear down the connection and set it up again, it works again for sometime but eventually run into same issue again! Any help or pointers is appreciated. Let me know if the above information is insufficient to understand the problem I'm trying to explain here.
reply other threads:[~2024-11-18 14:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=IA1PR11MB78918BC170A4CB3EF05FB998FF5F2@IA1PR11MB7891.namprd11.prod.outlook.com \
--to=indira@versa-networks.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).