From: "cron2 (Code Review)" Date: Fri, 25 Jul 2025 17:20:30 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., antonio@...2726... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="19RCOgstbeE="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: dco_linux: fix async message reception List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: plaisthos , flichtenheld , openvpn-devel --19RCOgstbeE= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, ordex, plaisthos. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/ope= nvpn/+/1100?usp=3Demail ) Change subject: dco_linux: fix async message reception ...................................................................... Patch Set 5: Code-Review+2 (1 comment) Patchset: PS5: Hah, gotcha ``` Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_get_peer_stats_multi Jul 25 19:18:56 ubuntu2004 tun-udp-p2p-tls-sha256[186220]: dco_do_read Jul 25 19:18:56 ubuntu2004 tun-udp-p2p-tls-sha256[186220]: ovpn-dco: receiv= ed netlink message type=3D31 cmd=3D11 flags=3D0000 Jul 25 19:18:56 ubuntu2004 tun-udp-p2p-tls-sha256[186220]: ovpn-dco: ignori= ng message for foreign ifindex 982 Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: ovpn-dco: received netlink= message type=3D31 cmd=3D11 flags=3D0000 Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: ovpn-dco: received CMD_PEE= R_FLOAT_NTF, ifindex: 982, peer-id 2, address: [AF_INET]193.149.48.173:59979 Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: ovpn-dco: received netlink= message type=3D31 cmd=3D3 flags=3D0x0002 Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: ovpn_handle_peer_multi: pa= rsing message... Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_update_peer_stat / dco= _read_bytes(0): 615704 Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_update_peer_stat / dco= _write_bytes(0): 625840 Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_update_peer_stat / tun= _read_bytes(0): 562992 Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_update_peer_stat / tun= _write_bytes(0): 568872 Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: ovpn-dco: received netlink= message type=3D31 cmd=3D3 flags=3D0x0002 Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: ovpn_handle_peer_multi: pa= rsing message... Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_update_peer_stat / dco= _read_bytes(2): 11732 Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_update_peer_stat / dco= _write_bytes(2): 11392 Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_update_peer_stat / tun= _read_bytes(2): 9256 Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_update_peer_stat / tun= _write_bytes(2): 9256 Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_do_read Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_do_read: netlink repor= ts blocking read - aborting wait Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: peer 2 (cron2-freebsd-tc-a= md64) floated from udp6:193.149.48.172:59979 to [AF_INET6]::ffff:193.149.48= .173:59979 Jul 25 19:18:57 ubuntu2004 kernel: [294871.134548] tun1: peer 2 floated to = 193.149.48.173:59979 ``` this is precisely the situation that makes the pre-1100 code lose the "FLOA= T!" message, because it arrives *after* `dco_get_peer_stats_multi()` starts= running (or just before, but we do not look at DCO events) and before the = actual cmd=3D3 reply comes in. Good work! -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1100?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I23ad79e14844aefde9ece34dadef0b75ff267201 Gerrit-Change-Number: 1100 Gerrit-PatchSet: 5 Gerrit-Owner: ordex Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Attention: ordex Gerrit-Comment-Date: Fri, 25 Jul 2025 17:20:30 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment --19RCOgstbeE= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, ordex, plaisthos. <= /p>

Patch set 5:Code-Review +2=

V= iew Change

1 comment:

  • Patchset:

    • Patch Set #5:

      Hah, gotcha

      ```
      Jul 25 19:18:56 ubuntu2004 tun-udp-p2m= p[186147]: dco_get_peer_stats_multi
      Jul 25 19:18:56 ubuntu2004 tun-udp-p= 2p-tls-sha256[186220]: dco_do_read
      Jul 25 19:18:56 ubuntu2004 tun-udp-p2= p-tls-sha256[186220]: ovpn-dco: received netlink message type=3D31 cmd=3D11= flags=3D0000
      Jul 25 19:18:56 ubuntu2004 tun-udp-p2p-tls-sha256[186220]:= ovpn-dco: ignoring message for foreign ifindex 982
      Jul 25 19:18:56 ubun= tu2004 tun-udp-p2mp[186147]: ovpn-dco: received netlink message type=3D31 c= md=3D11 flags=3D0000
      Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: ov= pn-dco: received CMD_PEER_FLOAT_NTF, ifindex: 982, peer-id 2, address: [AF_= INET]193.149.48.173:59979
      Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147= ]: ovpn-dco: received netlink message type=3D31 cmd=3D3 flags=3D0x0002
      J= ul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: ovpn_handle_peer_multi: par= sing message...
      Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_upd= ate_peer_stat / dco_read_bytes(0): 615704
      Jul 25 19:18:56 ubuntu2004 tun= -udp-p2mp[186147]: dco_update_peer_stat / dco_write_bytes(0): 625840
      Jul= 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_update_peer_stat / tun_re= ad_bytes(0): 562992
      Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco= _update_peer_stat / tun_write_bytes(0): 568872
      Jul 25 19:18:56 ubuntu200= 4 tun-udp-p2mp[186147]: ovpn-dco: received netlink message type=3D31 cmd=3D= 3 flags=3D0x0002
      Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: ovpn_h= andle_peer_multi: parsing message...
      Jul 25 19:18:56 ubuntu2004 tun-udp-= p2mp[186147]: dco_update_peer_stat / dco_read_bytes(2): 11732
      Jul 25 19:= 18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_update_peer_stat / dco_write_byt= es(2): 11392
      Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_update= _peer_stat / tun_read_bytes(2): 9256
      Jul 25 19:18:56 ubuntu2004 tun-udp-= p2mp[186147]: dco_update_peer_stat / tun_write_bytes(2): 9256
      Jul 25 19:= 18:56 ubuntu2004 tun-udp-p2mp[186147]: dco_do_read
      Jul 25 19:18:56 ubunt= u2004 tun-udp-p2mp[186147]: dco_do_read: netlink reports blocking read - ab= orting wait
      Jul 25 19:18:56 ubuntu2004 tun-udp-p2mp[186147]: peer 2 (cro= n2-freebsd-tc-amd64) floated from udp6:193.149.48.172:59979 to [AF_INET6]::= ffff:193.149.48.173:59979
      Jul 25 19:18:57 ubuntu2004 kernel: [294871.134= 548] tun1: peer 2 floated to 193.149.48.173:59979
      ```

      this is precisely the situation= that makes the pre-1100 code lose the "FLOAT!" message, because = it arrives *after* `dco_get_peer_stats_multi()` starts running (or just bef= ore, but we do not look at DCO events) and before the actual cmd=3D3 reply = comes in.

      Goo= d work!

To view, visit change 1100. To unsubscribe, o= r for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I23ad79e14844aefde9ece34dade= f0b75ff267201
Gerrit-Change-Number: 1100
Gerrit-PatchSet: 5
Gerrit-Owner: ordex <antonio@...2726...>=
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: ordex <antonio@...2726...= >
Gerrit-Comment-Date: Fri, 25 Jul 2025 17:20:30= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
--19RCOgstbeE=--