OpenVPN 2.7.6 compatibility regression with MikroTik RouterOS clients – HARD_RESET_CLIENT_V2 packet ID 1 rejected

オープン
#1,097 コメント 12 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
活発
技術スタック
c
領域
networking

調査の方向性

OpenVPN 2.7.6 の P_CONTROL_HARD_RESET_CLIENT_V2 に対する検証パスから始め、2.7.5 と比較します。提供された TCP ログまたは RouterOS クライアントを使用して、パケット ID 1 を再現してください。互換モードが安全かどうかを判断し、より厳格なデフォルトを変更せずに移行パスを定義できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

cannotreproduce

Hello OpenVPN developers,

I would like to report a compatibility regression observed after upgrading an OpenVPN server to OpenVPN 2.7.6.

The affected clients are MikroTik routers using the built-in RouterOS OpenVPN client.

Server environment
  • OS: Debian 13 (Trixie)
  • OpenVPN: 2.7.6-trixie1
  • Architecture: amd64
  • Package repository: official OpenVPN 2.7 Debian repository (build.openvpn.net)
  • Transport: TCP

Installed package:

openvpn:
  Installed: 2.7.6-trixie1
  Candidate: 2.7.6-trixie1

The following previous releases are also available from the same repository:

2.7.5-trixie1
2.7.4-trixie1
2.7.3-trixie1
...
Problem

After upgrading to OpenVPN 2.7.6, multiple MikroTik RouterOS OpenVPN clients can establish a TCP connection to the server, but cannot proceed with the OpenVPN TLS handshake.

The server reports:

2026-08-21 13:58:49 TCP connection established with [AF_INET]WWW.XXX.YYY.ZZZ:34021
2026-08-21 13:58:49 tcp4-server:WWW.XXX.YYY.ZZZ:34021 TLS Error: received P_CONTROL_HARD_RESET_CLIENT_V2 with packet id 1 from [AF_INET]WWW.XXX.YYY.ZZZ:34021 -- 0 was expected, ignoring packet

2026-08-21 13:58:49 TCP connection established with [AF_INET]WWW.XXX.YYY.ZZZ:11444
2026-08-21 13:58:49 tcp4-server:WWW.XXX.YYY.ZZZ:11444 TLS Error: received P_CONTROL_HARD_RESET_CLIENT_V2 with packet id 1 from [AF_INET]WWW.XXX.YYY.ZZZ:11444 -- 0 was expected, ignoring packet

2026-08-21 13:58:49 tcp4-server:WWW.XXX.YYY.ZZZ:55386 TLS Error: received P_CONTROL_HARD_RESET_CLIENT_V2 with packet id 1 from [AF_INET]WWW.XXX.YYY.ZZZ:55386 -- 0 was expected, ignoring packet

This behavior is reproducible with multiple independent MikroTik clients.

All of them appear to send:

P_CONTROL_HARD_RESET_CLIENT_V2
packet id = 1

while OpenVPN 2.7.6 requires:

packet id = 0

The packet is therefore ignored before the TLS handshake can proceed.

OpenVPN 2.7.6 behavior change

As I understand it, OpenVPN 2.7.6 introduced stricter validation of HARD_RESET packets and now rejects a HARD_RESET packet when its sequence/packet ID is not 0.

This appears to be correct according to the expected OpenVPN protocol behavior.

However, existing MikroTik RouterOS OpenVPN clients appear to have been sending the initial HARD_RESET packet with ID 1, which was tolerated by previous OpenVPN releases.

As a result, upgrading an existing OpenVPN server to 2.7.6 can cause all affected MikroTik RouterOS OpenVPN clients to stop connecting immediately.

Expected / previous behavior

Previous OpenVPN server releases tolerated the MikroTik client's:

P_CONTROL_HARD_RESET_CLIENT_V2 packet id 1

allowing the handshake to continue.

OpenVPN 2.7.6 behavior

OpenVPN 2.7.6 rejects it with:

TLS Error: received P_CONTROL_HARD_RESET_CLIENT_V2 with packet id 1 ... -- 0 was expected, ignoring packet

This prevents the connection from reaching the TLS certificate verification stage.

Current workaround

Downgrading the OpenVPN server from:

2.7.6-trixie1

to:

2.7.5-trixie1

is currently being considered as a compatibility workaround.

There does not appear to be a server configuration option in OpenVPN 2.7.6 to disable only this new HARD_RESET packet-ID validation.

Options related to certificate verification, replay protection, or general compatibility do not appear to control this check.

Questions / request

I understand that sending a HARD_RESET packet with ID 1 may be incorrect behavior on the MikroTik side, and I am also reporting the issue to MikroTik.

However, considering that existing deployed RouterOS clients apparently relied on the behavior accepted by previous OpenVPN releases, could you please clarify:

  1. Is rejecting P_CONTROL_HARD_RESET_CLIENT_V2 with packet ID 1 intentional and mandatory behavior in OpenVPN 2.7.6?

  2. Is there currently any configuration option or compat-mode setting that can restore the pre-2.7.6 behavior temporarily?

  3. If not, would you consider adding a temporary compatibility option allowing non-zero HARD_RESET packet IDs for legacy/third-party clients?

  4. Are there security implications that make retaining the previous tolerant behavior unacceptable?

The goal would not be to change the default behavior, but to provide administrators with a migration path for existing MikroTik RouterOS deployments until the client implementation is fixed.

I can provide additional server logs, configuration details, and packet captures if needed.

ROS: 6.49.20 and 7.23.3

主要言語
C
スター
14.8k
フォーク
3.4k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OpenVPN/openvpn のほかの issue

OpenVPN/openvpn の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。