DCO-Win: explicit-exit-notify is dropped when using DC

Open
#1,118 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c
Domain
networking

Research direction

Start by tracing the log message “Attempting to send data packet while data channel offload is in use” and how the client negotiates cc-exit when using DCO-Win. Compare that path with the reported TAP-Windows6 behavior and the documented fallback for explicit-exit-notify. Done means establishing whether DCO-Win should deliver the notification when cc-exit is unavailable and, if so, identifying how that delivery can work.

Written by the indexing model from the issue text.

Description

DCO-Win: explicit-exit-notify is not delivered when DCO is used

I found a reproducible interoperability problem with explicit-exit-notify when using the Windows DCO driver.

This is not specific to Wintun, and it is not specific to one particular OpenVPN GUI version.

The problem is reproducible whenever DCO is used, while TAP-based connections correctly notify the server about the disconnect.

Server:

  • MikroTik RouterOS 7.24.4
  • OpenVPN server
  • UDP

Client:

  • Windows
  • OpenVPN 2.7.x
  • UDP
  • explicit-exit-notify 1
Observed behavior

With a TAP-Windows6 connection, disconnecting the client immediately removes the OVPN session from the MikroTik server.

With DCO-Win, the client disconnects locally, but the OVPN session remains on the MikroTik server until the server-side keepalive timeout expires.

The same behavior is reproducible with different OpenVPN GUI/OpenVPN client versions when DCO is used.

This should also be considered in the context of the fact that Wintun is no longer supported in OpenVPN 2.7. I am therefore using TAP-Windows6 as the non-DCO comparison, rather than relying on Wintun.

Relevant OpenVPN 2.7.7 log

With DCO enabled:

text
2026-10-06 16:39:53 Timers: ping 15, ping-restart 45, inactive 20
2026-10-06 16:39:53 Protocol options: explicit-exit-notify 1
2026-10-06 16:40:16 SIGTERM received, sending exit notification to peer
2026-10-06 16:40:16 Attempting to send data packet while data channel offload is in use. Dropping packet4

The client therefore detects the disconnect and attempts to send the exit notification, but the packet is dropped because DCO is in use.

The negotiated protocol options also do not contain cc-exit:

text
Protocol options: explicit-exit-notify 1

There is no:

text
protocol-flags cc-exit

According to the OpenVPN 2.7 documentation, if both peers support sending the exit notification over the control channel, it is sent that way. Otherwise it is sent as a data-channel message, which is ignored when data-channel offload is being used.

My MikroTik server does not appear to negotiate cc-exit with the DCO client.

Important comparison

The same MikroTik server and the same:

text
explicit-exit-notify 1

behave correctly when using TAP-Windows6:

TAP-Windows6:

  • client disconnect
  • exit notification reaches the server
  • OVPN session is removed immediately

DCO-Win:

  • client disconnect
  • OpenVPN attempts to send exit notification
  • DCO drops the packet
  • server does not immediately remove the session
  • session remains until keepalive timeout

So the relevant difference appears to be DCO vs. non-DCO, rather than Wintun vs. DCO or one particular OpenVPN GUI release.

Question

What is the expected behavior of DCO-Win when connecting to an OpenVPN server which supports explicit-exit-notify but does not negotiate cc-exit?

Is there currently a supported way for DCO-Win to deliver explicit-exit-notify in this situation?

Or is this an expected DCO interoperability limitation which should be addressed so that the client can still notify the peer when cc-exit is unavailable?

Thanks!

Dominant language
C
Stars
14.8k
Forks
3.4k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenVPN/openvpn

All issues in OpenVPN/openvpn

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.