OpenVPN
Find a file
Antonio Quartulli 5a3b755f23 dco_linux: fix async message reception
Currently whenever we send a PEER_GET request to ovpn, we also
set the CB that is supposed to parse the reply.

However, due to the async nature of netlink messages, we could
get an unrelated notification, sent by ovpn upon some event,
after having set the CB, but before parsing the awaited reply.

When this happens, the notification is then parsed with the
configured CB instead of the notification parser, thus effectively
rejecting the notification and losing the event.

To fix this inconsistency, make ovpn_handle_msg() the default and
only netlink parser CB. It is configured upon DCO initialization
and is never removed.

ovpn_handle_msg() will check the message type and will call the
according parser. This way, no matter what message we get at
what time, but we'll always parse it correctly.

As a bonus we can also simplify the nl_sendmsg() API as we
don't need to pass the cb and its argument anymore.

The ID of the NLCTRL family is now also stored in the DCO
context as we need it to check when we receive a mcast ID
lookup message.

Change-Id: I23ad79e14844aefde9ece34dadef0b75ff267201
Github: OpenVPN/openvpn#793
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
2025-07-23 14:28:37 +02:00
.github GHA: Dependency updates July 2025 2025-07-22 17:56:46 +02:00
contrib Replace deprecated OpenSSL.crypto.load_crl 2025-07-08 18:50:12 +02:00
debug build: standard directory layout 2012-03-22 22:07:08 +01:00
dev-tools Update copyright statements to 2025 2025-05-31 22:38:38 +02:00
distro mac dns: do not run dns-updown in parallel 2025-07-15 16:08:44 +02:00
doc Route: add support for user defined routing table 2025-06-22 13:07:14 +02:00
include Update copyright statements to 2025 2025-05-31 22:38:38 +02:00
m4 configure: update old copy of pkg.m4 2024-05-06 18:24:23 +02:00
sample Delete old sample-windows file and obsolete Windows sample handling 2025-06-02 17:59:45 +02:00
src dco_linux: fix async message reception 2025-07-23 14:28:37 +02:00
tests t_server_null: match test numbers with server numbers 2025-07-16 23:01:35 +02:00
.git-blame-ignore-revs uncrustify: add sp_after_comma=add 2022-05-22 13:10:22 +02:00
.gitattributes cleanup: add .gitattributes to control eol style explicitly 2012-04-26 20:54:26 +02:00
.gitignore dns: apply settings via script on unixoid systems 2025-05-14 18:17:51 +02:00
.mailmap Update .mailmap to unify and clean up odd names and e-mail addresses 2016-10-18 13:46:04 +02:00
.svncommitters Added mapping files from SVN commit ID to more descriptive commit IDs. 2010-10-21 11:31:26 +02:00
AUTHORS This is the start of the BETA21 branch. 2005-09-26 05:28:27 +00:00
ChangeLog OpenVPN Release 2.7_alpha2 2025-06-18 18:34:37 +02:00
Changes.rst OpenVPN Release 2.7_alpha2 2025-06-18 18:34:37 +02:00
CMakeLists.txt Cleanup/simplify mbed TLS related define from autoconf 2025-07-15 15:47:47 +02:00
CMakePresets.json Add building/testing with msbuild and the clang compiler 2024-12-27 12:30:55 +01:00
compat.m4 Remove checks for uint* types that are part of C99 2021-04-07 08:30:34 +02:00
config.h.cmake.in Cleanup/simplify mbed TLS related define from autoconf 2025-07-15 15:47:47 +02:00
configure.ac configure.ac: Remove use of PKCS11_HELPER_LIBS in mbedTLS checks 2025-07-16 18:25:04 +02:00
CONTRIBUTING.rst Add git pre-commit hook script to uncrustify 2022-04-22 09:25:55 +02:00
COPYING Update copyright statements to 2025 2025-05-31 22:38:38 +02:00
COPYRIGHT.GPL copyright: Update GPLv2 license texts 2017-06-16 10:38:03 +02:00
forked-test-driver forked-test-driver: Show test output always 2024-04-02 17:20:48 +02:00
INSTALL Haiku: Introduce basic platform / tun support 2024-11-28 12:19:38 +01:00
ltrc.inc cmake: symlink whole build dir not just .json file 2024-01-17 15:01:54 +01:00
Makefile.am Update copyright statements to 2025 2025-05-31 22:38:38 +02:00
NEWS This is the start of the BETA21 branch. 2005-09-26 05:28:27 +00:00
PORTS Update copyright statements to 2025 2025-05-31 22:38:38 +02:00
README README.cmake.md: Add new documentation for CMake buildsystem 2023-07-07 19:07:10 +02:00
README.awslc Add compatibility to build OpenVPN with AWS-LC. 2025-01-29 17:11:19 +01:00
README.cmake.md README.cmake.md: Document minimum required CMake version for --preset 2024-02-01 20:26:45 +01:00
README.dco.md README.dco: update Linux instructions 2025-07-16 16:16:35 +02:00
README.ec Implement tls-groups option to specify eliptic curves/groups 2020-07-21 22:33:58 +02:00
README.mbedtls mbedtls: Allow TLS 1.3 if available 2025-06-03 16:15:06 +02:00
README.wolfssl Added PQE to WolfSSL 2025-07-07 16:06:04 +02:00
renovate.json GHA: Dependency and Actions update May 2025 2025-05-18 17:41:42 +02:00
version.m4 OpenVPN Release 2.7_alpha2 2025-06-18 18:34:37 +02:00

OpenVPN -- A Secure tunneling daemon

Copyright (C) 2002-2022 OpenVPN Inc. This program is free software;
you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.

*************************************************************************

To get the latest release of OpenVPN, go to:

	https://openvpn.net/community-downloads/

To Build and Install,

	tar -zxf openvpn-<version>.tar.gz
	cd openvpn-<version>
	./configure
	make
	make install

or see the file INSTALL for more info.

For information on how to build OpenVPN on/for Windows with MinGW
or MSVC see README.cmake.md.

*************************************************************************

For detailed information on OpenVPN, including examples, see the man page
  http://openvpn.net/man.html

For a sample VPN configuration, see
  http://openvpn.net/howto.html

To report an issue, see
  https://github.com/OpenVPN/openvpn/issues/new
  (Note: We recently switched to GitHub for reporting new issues,
   old issues can be found at:
   https://community.openvpn.net/openvpn/report)

For a description of OpenVPN's underlying protocol,
  see the file ssl.h included in the source distribution.

*************************************************************************

Other Files & Directories:

* configure.ac -- script to rebuild our configure
  script and makefile.

* sample/sample-scripts/verify-cn

  A sample perl script which can be used with OpenVPN's
  --tls-verify option to provide a customized authentication
  test on embedded X509 certificate fields.

* sample/sample-keys/

  Sample RSA keys and certificates.  DON'T USE THESE FILES
  FOR ANYTHING OTHER THAN TESTING BECAUSE THEY ARE TOTALLY INSECURE.

* sample/sample-config-files/

  A collection of OpenVPN config files and scripts from
  the HOWTO at http://openvpn.net/howto.html

*************************************************************************

Note that easy-rsa and tap-windows are now maintained in their own subprojects.
Their source code is available here:

  https://github.com/OpenVPN/easy-rsa
  https://github.com/OpenVPN/tap-windows6

Community-provided Windows installers (MSI) and Debian packages are built from

  https://github.com/OpenVPN/openvpn-build

See the INSTALL file for usage information.