]> git.ipfire.org Git - thirdparty/openvpn.git/commit
dco: Add support for float notifications
authorRalf Lici <ralf@mandelbit.com>
Fri, 18 Jul 2025 12:22:24 +0000 (14:22 +0200)
committerGert Doering <gert@greenie.muc.de>
Fri, 18 Jul 2025 15:48:18 +0000 (17:48 +0200)
commitcb8a0f6f5741d102b667d98370ab4d553503d0b5
tree93aa91c6a2ee452ba409c437ce35ad366d560165
parent31aedd7fbfd9d4856a5ae7085d15228ec57fb2a1
dco: Add support for float notifications

When a peer changes its UDP endpoint, the DCO module emits a
notification to userpace. The message is parsed and the relevant
information are extracted in order to process the floating operation.

Note that we preserve IPv4-mapped IPv6 addresses in userspace when
receiving a pure IPv4 address from the module, otherwise openvpn
wouldn't be able to retrieve the multi_instance using the transport
address hash table lookup.

It may happen that a netlink notification gets lost, causing us to skip
a float step. If the peer then floats back to its previous address,
userspace closes the only valid instance while trying to process the
float, leading to a segfault. To prevent this, we ignore float attempts
to an address already taken by a peer with the same peer ID.

Change-Id: I33e9272b4196c7634db2fb33a75ae4261660867f
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Antonio Quartulli <antonio@mandelbit.com>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: <20250718122230.14008-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32210.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/dco_linux.c
src/openvpn/dco_linux.h
src/openvpn/dco_win.c
src/openvpn/dco_win.h
src/openvpn/forward.c
src/openvpn/forward.h
src/openvpn/multi.c
src/openvpn/multi.h
src/openvpn/ovpn_dco_linux.h
src/openvpn/ovpn_dco_win.h