You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DCO client doesn't answer management status while reconnecting #1146
Describe the bug
With DCO enabled, after a ping-restart the client stops answering the status command on the management interface until the tunnel is back up. The command gets read but nothing comes back, not even END. Since management serves one client at a time, whoever asked for the status locks both the request and all the subsequent ones, even the --status file.
Seems to come from print_status(), which returns early if dco_get_peer_stats() fails:
if (dco_get_peer_stats(c, true) < 0)
{
return;
}
During the reconnect there's no DCO interface, so the call fails and nothing gets printed.
To Reproduce
Client with DCO and a management socket (management /var/run/openvpn.sock unix)
Connect it to a server, then stop the server
After the ping-restart, send status on the socket: printf 'status\n' | socat - UNIX-CONNECT:/var/run/openvpn.sock
Only the greeting comes back
Disabling the DCO solves the issue and responses from the management sockets are fine.
Expected behavior
status always answers and ends with END, with the last known counters if the DCO peer is gone.
Version information (please complete the following information):
OS: OpenWrt 25.12, kernel 6.12 with ovpn-backports
OpenVPN version: 2.7.7
Peer: 2.7.7 with DCO
Additional context
A possible fix could be removing the if condition entirely, and make return dco_get_peer_stats(c, true);, at the moment I'm running this patch and seems to work fine. On a read DCO error SIGUSR1 is still reported fine so session restarts are still signaled and taken care of.
I can send the patch to the list or Gerrit if it's fine.
@Tbaile I reviewed your patch and I actually found another issue in the same scenario.
I have created a patch for that problem too: https://gerrit.openvpn.net/c/openvpn/+/2204
Feel free to test/review if you feel like.
Will compile it first thing in the morning, anything to test for the linux side in particular?
same test you did for this patch (issue status during reconnect) but with --persist-tun in the client config.
The patch carries a potential one line bash command aimed at triggering this.
In theory the client should crash without the patch.
Both issues seems to be fixed by applying both of the patches. We don't use the --persist-tun but after adding it the daemon crashed as you noticed, with the patch it closed correctly all the times
Activity
ordex commentedon Nov 16, 2026
Please, feel free to send it. Gerrit works best.
Thanks!
Tbaile commentedon Nov 16, 2026
Done: https://gerrit.openvpn.net/c/openvpn/+/2201
Thanks!
ordex commentedon Nov 16, 2026
@Tbaile I reviewed your patch and I actually found another issue in the same scenario.
I have created a patch for that problem too: https://gerrit.openvpn.net/c/openvpn/+/2204
Feel free to test/review if you feel like.
Tbaile commentedon Nov 16, 2026
Will compile it first thing in the morning, anything to test for the linux side in particular?
ordex commentedon Nov 16, 2026
same test you did for this patch (issue
statusduring reconnect) but with--persist-tunin the client config.The patch carries a potential one line bash command aimed at triggering this.
In theory the client should crash without the patch.
Tbaile commentedon Nov 17, 2026
Both issues seems to be fixed by applying both of the patches. We don't use the
--persist-tunbut after adding it the daemon crashed as you noticed, with the patch it closed correctly all the timesThanks for your time!
ordex commentedon Nov 17, 2026
Thank for testing @Tbaile ! Feel free to comment on Gerrit with your results.
Tbaile commentedon Nov 17, 2026
Commented your patch with the linux findings, probably messed up since not knowing Gerrit that much 😅
ordex commentedon Nov 17, 2026
looks good, thanks!
fix(ovpn): DCO status hang and disable toggle (#2018)
fix(ovpn): DCO status hang and disable toggle (#2018)
fix(ovpn): DCO status hang and disable toggle (#2018)
dco: always print the status block
dco: always print the status block
fix(ovpn): DCO status hang and disable toggle (#2018)
fix(ovpn): DCO status hang and disable toggle (#2018)
fix(ovpn): DCO status hang and disable toggle (#2018)