openvpn: DCO causes 75% packet loss and ~49x TCP throughput regression on ipq807x

Open
#30,832 8 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

Research direction

Start by locating the OpenVPN package and its DCO related build or configuration files in this repository; the report does not name specific paths or tests. Reproduce the comparison on qualcommax/ipq807x with DCO enabled and disabled, then investigate the tun0 transmit drops and the packet loss and throughput difference. Done means identifying and fixing the DCO regression, with the reported UDP and TCP tests confirming the result.

Written by the indexing model from the issue text.

Description

bug
Package Name

openvpn

Maintainer

@commodo

OpenWrt Version

25.12.6 (r33311-981c978eff)

OpenWrt Target/Subtarget

qualcommax/ipq807x

Steps to Reproduce
  1. Use OpenVPN 2.7.7 on an OpenWrt 25.12.6 qualcommax/ipq807x client router with DCO enabled, connecting over UDP/1194 to an OpenVPN server running OpenWrt 25.12.6 on x86/64.
  2. Confirm the client log contains "DCO device tun0 opened" and "ovpn-dco device [tun0] opened".
  3. From a Windows PC behind the client router, run:
    iperf3.exe -c computer-adress-behindvpn-u -b 5M -l 1200 -t 20
    iperf3.exe -ccomputer-adress-behindvpn -t 20
    The iperf3 server is a Linux PC behind the VPN server.
  4. Add "disable-dco" to /etc/openvpn/ovpn_client_file.ovpn and restart OpenVPN.
  5. Confirm the log now says "TUN/TAP device tun0 opened" rather than "DCO device tun0 opened".
  6. Repeat the exact same iperf3 tests.
Actual Behaviour

With DCO enabled:

  • UDP test at 5 Mbps, 1200-byte datagrams: 1.22 Mbps received, 7842/10418 packets lost (75%).
  • Single-stream TCP: approximately 2.30 Mbps received.
  • tun0 transmit-drop counter increases rapidly during traffic.

With DCO disabled (same hardware, endpoints and server):

  • UDP: 4.99 Mbps received, 0/10417 packets lost (0%), jitter 0.846 ms.
  • Single-stream TCP: 112 Mbps received (269 MBytes over 20.16 seconds).

Disabling DCO improves TCP throughput by approximately 49x and eliminates the observed UDP loss.

Client: OpenWrt 25.12.6 r33311-981c978eff, qualcommax/ipq807x, OpenVPN 2.7.7, kernel 6.12.112, OpenSSL 3.5.9, AES-256-GCM. Server: OpenWrt 25.12.6 x86/64. The only intentional change during the A/B test was disabling DCO on the client. The first affected OpenWrt version is not established.

Confirmation Checklist
Dominant language
Makefile
Stars
4.7k
Forks
4k
Avg merge
2d 2h
Merged PRs (30d)
251

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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 openwrt/packages

All issues in openwrt/packages

Similar issues

More Networking issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.