DCO client doesn't answer management `status` while reconnecting
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 71/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- c
- 領域
- backend, networking
調査の方向性
まず print_status() とその dco_get_peer_stats() の呼び出しから始めます。issue では、再接続中に DCO ピア統計の取得に失敗すると、管理用 status 応答が未完了のままになる早期リターンが指摘されています。print_status() がステータス行と終端の END をどのように書き込むかを追い、その後、関連するステータスおよび DCO のテストを確認します。再接続中に status が END で完了し、DCO ピアがいなくなった場合も最後に判明しているカウンターを保持できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
statuson 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.
- 主要言語
- C
- スター
- 14.8k
- フォーク
- 3.4k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenVPN/openvpn のほかの issue
-
CVE-2026-11604 vs OpenVPN 2.7.x Documentation再び着手できるかも @lstipakov が 35 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンDCO website Windows
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Document Real Address format change in management/status output (OpenVPN 2.7)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンdocumentation enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Since 2.7.9 "route-method exe" can't set route対応中かも @d12fk が 1 日前に担当しました。 オープンoutdated code Windows
-
enhancement feature
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
TCP server spins at 100% CPU when accept() fails with EMFILE対応中かも @itsGiaan が 2 日前に担当しました。 オープンbug
OpenVPN/openvpn の issue をすべて見る
似ている issue
-
issue: bug report
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Stellarium/stellarium#5197 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ChupathingyCE/chupathingyce#1550 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] SWAPDB sends no invalidation to CLIENT TRACKING clients対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
redis/redis#16302 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信