]> git.ipfire.org Git - thirdparty/openvpn.git/commit
event/multi: add event_arg object to make event handling more generic
authorAntonio Quartulli <a@unstable.cc>
Wed, 23 Oct 2024 08:08:52 +0000 (10:08 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 23 Oct 2024 08:12:54 +0000 (10:12 +0200)
commitcd8e25a6e9a0fc3687cf8b9df460885db2aee566
tree4079c3e905940842b181290cd3765ae1cb961526
parent8ae409ad72a980d79dd8d40ab4284c3fab1efeb9
event/multi: add event_arg object to make event handling more generic

In order to prepare the event handling code to deal with multiple
listening sockets, we have to make sure that it is possible to
distinguish which of these sockets have been poked by an incoming
connection request.

To achieve that, this patch changes the object being passed as
event handler argument, from a "partly integer-evaluated variable"
to a full struct with a proper type attribute.

This struct will allow the code to carry around the particular
listening socket where the connection is being established.

This change affects the TCP server code path only as UDP servers
use only one socket to handle all clients.

Change-Id: Icd7f6a2ad350cdc2312b3e80fa0dbdd7e4311d2e
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Signed-off-by: Gianmarco De Gregori <gianmarco@mandelbit.com>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20241023080853.3710-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29602.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/event.h
src/openvpn/mtcp.c
src/openvpn/multi.c
src/openvpn/multi.h
src/openvpn/socket.c
src/openvpn/socket.h