From: "its_Giaan (Code Review)" Date: Mon, 23 Sep 2024 13:41:15 +0000 References: Reply-To: gianmarco@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., a@...2181... Message-ID: <3d50cbad3bd2690fa9ce4171bfdabe5f39b17553-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="ZZU+JF2Lwy8="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: pass link_socket object to i/o functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --ZZU+JF2Lwy8= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, ordex, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/758?usp=3Demail to review the following change. Change subject: pass link_socket object to i/o functions ...................................................................... pass link_socket object to i/o functions In order to prepare the code to work with distinct sockets, it is essential that i/o functions do not operate on any hard-coded socket object (i.e. c->c2.link_socket). This patch changes all the low-level i/o functionis to work with a socket specified as argument rather than a fixed one. Change-Id: I8eae2d3356bbcc5d632eeb4fbe80de8009d9b40d Signed-off-by: Antonio Quartulli --- M src/openvpn/event.h M src/openvpn/forward.c M src/openvpn/forward.h M src/openvpn/mtcp.c M src/openvpn/mudp.c M src/openvpn/multi.h M src/openvpn/openvpn.c M src/openvpn/socket.c 8 files changed, 44 insertions(+), 36 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/58/758/1 diff --git a/src/openvpn/event.h b/src/openvpn/event.h index 844ea7b..57341e0 100644 --- a/src/openvpn/event.h +++ b/src/openvpn/event.h @@ -137,6 +137,7 @@ event_arg_t type; union { struct multi_instance *mi; /* if type =3D EVENT_ARG_MULTI_INSTANCE= */ + struct link_socket *ls; /* if type =3D EVENT_ARG_LINK_SOCKET */ } u; }; diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index a88a4bb..16b4497 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -883,9 +883,9 @@ */ static inline void -socks_postprocess_incoming_link(struct context *c) +socks_postprocess_incoming_link(struct context *c, struct link_socket *ls) { - if (c->c2.link_socket->socks_proxy && c->c2.link_socket->info.proto = =3D=3D PROTO_UDP) + if (ls->socks_proxy && ls->info.proto =3D=3D PROTO_UDP) { socks_process_incoming_udp(&c->c2.buf, &c->c2.from); } @@ -893,13 +893,14 @@ static inline void socks_preprocess_outgoing_link(struct context *c, + struct link_socket *ls, struct link_socket_actual **to_addr, int *size_delta) { - if (c->c2.link_socket->socks_proxy && c->c2.link_socket->info.proto = =3D=3D PROTO_UDP) + if (ls->socks_proxy && ls->info.proto =3D=3D PROTO_UDP) { *size_delta +=3D socks_process_outgoing_udp(&c->c2.to_link, c->c2.= to_link_addr); - *to_addr =3D &c->c2.link_socket->socks_relay; + *to_addr =3D &ls->socks_relay; } } @@ -924,7 +925,7 @@ */ void -read_incoming_link(struct context *c) +read_incoming_link(struct context *c, struct link_socket *ls) { /* * Set up for recvfrom call to read datagram @@ -939,17 +940,17 @@ c->c2.buf =3D c->c2.buffers->read_link_buf; ASSERT(buf_init(&c->c2.buf, c->c2.frame.buf.headroom)); - status =3D link_socket_read(c->c2.link_socket, + status =3D link_socket_read(ls, &c->c2.buf, &c->c2.from); - if (socket_connection_reset(c->c2.link_socket, status)) + if (socket_connection_reset(ls, status)) { #if PORT_SHARE - if (port_share && socket_foreign_protocol_detected(c->c2.link_sock= et)) + if (port_share && socket_foreign_protocol_detected(ls)) { - const struct buffer *fbuf =3D socket_foreign_protocol_head(c->= c2.link_socket); - const int sd =3D socket_foreign_protocol_sd(c->c2.link_socket); + const struct buffer *fbuf =3D socket_foreign_protocol_head(ls); + const int sd =3D socket_foreign_protocol_sd(ls); port_share_redirect(port_share, fbuf, sd); register_signal(c->sig, SIGTERM, "port-share-redirect"); } @@ -976,7 +977,7 @@ bool dco_win_timeout =3D tuntap_is_dco_win_timeout(c->c1.tuntap, statu= s); /* check recvfrom status */ - check_status(status, "read", c->c2.link_socket, NULL); + check_status(status, "read", ls, NULL); if (dco_win_timeout) { @@ -984,7 +985,7 @@ } /* Remove socks header if applicable */ - socks_postprocess_incoming_link(c); + socks_postprocess_incoming_link(c, ls); perf_pop(); } @@ -1221,11 +1222,11 @@ } static void -process_incoming_link(struct context *c) +process_incoming_link(struct context *c, struct link_socket *ls) { perf_push(PERF_PROC_IN_LINK); - struct link_socket_info *lsi =3D get_link_socket_info(c); + struct link_socket_info *lsi =3D &ls->info; const uint8_t *orig_buf =3D c->c2.buf.data; process_incoming_link_part1(c, lsi, false); @@ -1724,7 +1725,7 @@ */ void -process_outgoing_link(struct context *c) +process_outgoing_link(struct context *c, struct link_socket *ls) { struct gc_arena gc =3D gc_new(); int error_code =3D 0; @@ -1767,7 +1768,7 @@ #if PASSTOS_CAPABILITY /* Set TOS */ - link_socket_set_tos(c->c2.link_socket); + link_socket_set_tos(ls); #endif /* Log packet send */ @@ -1778,7 +1779,7 @@ } #endif msg(D_LINK_RW, "%s WRITE [%d] to %s: %s", - proto2ascii(c->c2.link_socket->info.proto, c->c2.link_sock= et->info.af, true), + proto2ascii(ls->info.proto, ls->info.af, true), BLEN(&c->c2.to_link), print_link_socket_actual(c->c2.to_link_addr, &gc), PROTO_DUMP(&c->c2.to_link, &gc)); @@ -1789,10 +1790,12 @@ int size_delta =3D 0; /* If Socks5 over UDP, prepend header */ - socks_preprocess_outgoing_link(c, &to_addr, &size_delta); + socks_preprocess_outgoing_link(c, ls, &to_addr, &size_delt= a); /* Send packet */ - size =3D (int)link_socket_write(c->c2.link_socket, &c->c2.= to_link, to_addr); + size =3D (int)link_socket_write(ls, + &c->c2.to_link, + to_addr); /* Undo effect of prepend */ link_socket_write_post_size_adjust(&size, size_delta, &c->= c2.to_link); @@ -1821,7 +1824,7 @@ /* Check return status */ error_code =3D openvpn_errno(); - check_status(size, "write", c->c2.link_socket, NULL); + check_status(size, "write", ls, NULL); if (size > 0) { @@ -2257,7 +2260,7 @@ } void -process_io(struct context *c) +process_io(struct context *c, struct link_socket *ls) { const unsigned int status =3D c->c2.event_set_status; @@ -2272,7 +2275,7 @@ /* TCP/UDP port ready to accept write */ if (status & SOCKET_WRITE) { - process_outgoing_link(c); + process_outgoing_link(c, ls); } /* TUN device ready to accept write */ else if (status & TUN_WRITE) @@ -2282,10 +2285,10 @@ /* Incoming data on TCP/UDP port */ else if (status & SOCKET_READ) { - read_incoming_link(c); + read_incoming_link(c, ls); if (!IS_SIG(c)) { - process_incoming_link(c); + process_incoming_link(c, ls); } } /* Incoming data on TUN device */ diff --git a/src/openvpn/forward.h b/src/openvpn/forward.h index 422c591..f656634 100644 --- a/src/openvpn/forward.h +++ b/src/openvpn/forward.h @@ -72,7 +72,8 @@ void pre_select(struct context *c); -void process_io(struct context *c); +void process_io(struct context *ci, struct link_socket *ls); + /**********************************************************************/ /** @@ -128,10 +129,11 @@ * context associated with the appropriate VPN tunnel for which data is * available to be read. * - * @param c - The context structure which contains the external - * network socket from which to read incoming packets. + * @param c The context structure which contains the external + * network socket from which to read incoming packets. + * @param ls The socket where the packet can be read from. */ -void read_incoming_link(struct context *c); +void read_incoming_link(struct context *c, struct link_socket *ls); /** * Starts processing a packet read from the external network interface. @@ -197,10 +199,11 @@ * * If an error occurs, it is logged and the packet is dropped. * - * @param c - The context structure of the VPN tunnel associated with the - * packet. + * @param c The context structure of the VPN tunnel associated with the + * packet. + * @param ls The socket to be used to send the packet. */ -void process_outgoing_link(struct context *c); +void process_outgoing_link(struct context *c, struct link_socket *ls); /*************************************************************************= */ diff --git a/src/openvpn/mtcp.c b/src/openvpn/mtcp.c index e47712a..c699e6e 100644 --- a/src/openvpn/mtcp.c +++ b/src/openvpn/mtcp.c @@ -484,7 +484,7 @@ ASSERT(mi); ASSERT(mi->context.c2.link_socket); set_prefix(mi); - read_incoming_link(&mi->context); + read_incoming_link(&mi->context, mi->context.c2.link_socket); clear_prefix(); if (!IS_SIG(&mi->context)) { diff --git a/src/openvpn/mudp.c b/src/openvpn/mudp.c index 268b430..e09111f 100644 --- a/src/openvpn/mudp.c +++ b/src/openvpn/mudp.c @@ -317,7 +317,7 @@ msg_set_prefix("Connection Attempt"); m->top.c2.to_link =3D m->hmac_reply; m->top.c2.to_link_addr =3D m->hmac_reply_dest; - process_outgoing_link(&m->top); + process_outgoing_link(&m->top, &m->top.c2.link_socket[0]); m->hmac_reply_dest =3D NULL; } } @@ -380,7 +380,7 @@ /* Incoming data on UDP port */ else if (status & SOCKET_READ) { - read_incoming_link(&m->top); + read_incoming_link(&m->top, m->top.c2.link_socket); if (!IS_SIG(&m->top)) { multi_process_incoming_link(m, NULL, mpp_flags); diff --git a/src/openvpn/multi.h b/src/openvpn/multi.h index e403989..8e961ea 100644 --- a/src/openvpn/multi.h +++ b/src/openvpn/multi.h @@ -678,7 +678,7 @@ { bool ret =3D true; set_prefix(mi); - process_outgoing_link(&mi->context); + process_outgoing_link(&mi->context, mi->context.c2.link_socket); ret =3D multi_process_post(m, mi, mpp_flags); clear_prefix(); return ret; diff --git a/src/openvpn/openvpn.c b/src/openvpn/openvpn.c index 16147b7..1db5422 100644 --- a/src/openvpn/openvpn.c +++ b/src/openvpn/openvpn.c @@ -91,7 +91,7 @@ } /* process the I/O which triggered select */ - process_io(c); + process_io(c, c->c2.link_socket); P2P_CHECK_SIG(); perf_pop(); diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index 924e30c..302b106 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -1828,6 +1828,7 @@ sock->sd =3D SOCKET_UNDEFINED; sock->ctrl_sd =3D SOCKET_UNDEFINED; sock->ev_arg.type =3D EVENT_ARG_LINK_SOCKET; + sock->ev_arg.u.ls =3D sock; return sock; } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/758?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: I8eae2d3356bbcc5d632eeb4fbe80de8009d9b40d Gerrit-Change-Number: 758 Gerrit-PatchSet: 1 Gerrit-Owner: its_Giaan Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: ordex Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Attention: ordex Gerrit-MessageType: newchange --ZZU+JF2Lwy8= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

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

its_Giaan would like plaisthos and flichtenheld to review this change.

Vi= ew Change

pass link_socket object to i/o functions

In order to p= repare the code to work with distinct sockets,
it is essential that i/o = functions do not operate on any
hard-coded socket object (i.e. c->c2.= link_socket).

This patch changes all the low-level i/o functionis to= work
with a socket specified as argument rather than a fixed one.
Change-Id: I8eae2d3356bbcc5d632eeb4fbe80de8009d9b40d
Signed-off-by: An= tonio Quartulli <a@...2181...>
---
M src/openvpn/event.h
M s= rc/openvpn/forward.c
M src/openvpn/forward.h
M src/openvpn/mtcp.c
= M src/openvpn/mudp.c
M src/openvpn/multi.h
M src/openvpn/openvpn.cM src/openvpn/socket.c
8 files changed, 44 insertions(+), 36 deletions(= -)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/5=
8/758/1
diff --git a/src/openvpn/event.h b/src/openvpn/event.h
index 844ea7b..57341e0 100644
--- a/src/openvpn= /event.h
+++ b/src/openvpn/event.h
@@ -137,= 6 +137,7 @@
event_arg_t type;
uni= on {
struct multi_instance *mi; /* if type =3D EVE= NT_ARG_MULTI_INSTANCE */
+ struct link_socket *ls; /* if type =3D EVENT_ARG_LINK_SOCKET *= /
} u;
};
diff --git a/src/openvpn/forward.c b/src/openvpn/forward.cindex a88a4bb..16b4497 100644
--- a/src/openvpn/forw= ard.c
+++ b/src/openvpn/forward.c
@@ -883,9= +883,9 @@
*/

static i= nline void
-socks_postp= rocess_incoming_link(struct context *c)
+socks_postprocess_incoming_link(struct context *c, stru= ct link_socket *ls)
{
- if (c->c2.link_socket->socks_proxy && c-= >c2.link_socket->info.proto =3D=3D PROTO_UDP)
+ if (ls->socks_proxy && ls-= >info.proto =3D=3D PROTO_UDP)
{
= socks_process_incoming_udp(&c->c2.buf, &c->c2.from);
}
@@ -893,13 +893,14 @@
=
static inline void
socks_preprocess_out= going_link(struct context *c,
+ struct link_socket *ls,
= struct link_socket_actual **to_addr,<= /span>
int *size_delta)
= {
- if (c->= ;c2.link_socket->socks_proxy && c->c2.link_socket->info.pr= oto =3D=3D PROTO_UDP)
+ if (ls->socks_proxy && ls->info.proto =3D=3D PROTO_UDP)=
{
*size_delta +=3D socks_pro= cess_outgoing_udp(&c->c2.to_link, c->c2.to_link_addr);
= - *to_addr =3D &c->= c2.link_socket->socks_relay;
+ *to_addr =3D &ls->socks_relay;
= }
}

@@ -924,7 +925,7= @@
*/

void
= -read_incoming_link(struct contex= t *c)
+read_incoming_= link(struct context *c, struct link_socket *ls)
{ /*
* Set up for recvfrom call to read da= tagram
@@ -939,17 +940,17 @@
c->c2.= buf =3D c->c2.buffers->read_link_buf;
ASSERT(buf= _init(&c->c2.buf, c->c2.frame.buf.headroom));

- status =3D link_soc= ket_read(c->c2.link_socket,
+ status =3D link_socket_read(ls,
= &c->c2.buf,
= &c->c2.from);

- if (socket_connection_reset(c->c2.link_so= cket, status))
+ i= f (socket_connection_reset(ls, status))
{
#if PORT_SHARE

- = if (port_share && socket_foreign_protocol_detected(c->c2.l= ink_socket))
+ = if (port_share && socket_foreign_protocol_detected(ls))
= {
- = const struct buffer *fbuf =3D socket_foreign_protocol_head(c->c2.= link_socket);
- = const int sd =3D socket_foreign_protocol_sd(c->c2.link_socket);
+ const struct= buffer *fbuf =3D socket_foreign_protocol_head(ls);
+ const int sd =3D socket_forei= gn_protocol_sd(ls);
port_share_redirect(port_s= hare, fbuf, sd);
register_signal(c->sig, SI= GTERM, "port-share-redirect");
}<= br>@@ -976,7 +977,7 @@
bool dco_win_timeout =3D = tuntap_is_dco_win_timeout(c->c1.tuntap, status);

/* check recvfrom status */
- check_status(status, "read", c->c2.l= ink_socket, NULL);
+ = check_status(status, "read", ls, NULL);

if (dco_win_timeout)
{
@@ -984,7 +985,7 @@

}

/* Remove socks header if applicable */

- socks_postprocess_incoming_link(c);+ socks_postprocess_incomi= ng_link(c, ls);

perf_pop(); }
@@ -1221,11 +1222,11 @@
}

static void
-process_incoming_link(struct context *c)
+process_incoming_link(struct conte= xt *c, struct link_socket *ls)

{
perf= _push(PERF_PROC_IN_LINK);

- struct link_socket_info *lsi =3D get_link_socket_= info(c);
+ struct = link_socket_info *lsi =3D &ls->info;
const uint= 8_t *orig_buf =3D c->c2.buf.data;

= process_incoming_link_part1(c, lsi, false);
@@ -1724,7 +17= 25,7 @@
*/

void=
-process_outgoing_link(struct= context *c)
+process= _outgoing_link(struct context *c, struct link_socket *ls)
= {
struct gc_arena gc =3D gc_new();
= int error_code =3D 0;
@@ -1767,7 +1768,7 @@

#if PASSTOS_CAPABILITY
/= * Set TOS */
- = link_socket_set_tos(c->c2.link_socket);
+ link_socket_set_tos(ls);
#endif


/* Log packet se= nd */
@@ -1778,7 +1779,7 @@
}<= /span>
#endif
msg(D_LINK_RW, "%= s WRITE [%d] to %s: %s",
- proto2ascii(c->c2.link_socket->info.proto, c-= >c2.link_socket->info.af, true),
+ proto2ascii(ls->info.proto, ls->in= fo.af, true),
BLEN(&c->c2.to_link),=
print_link_socket_actual(c->c2.to_link= _addr, &gc),
PROTO_DUMP(&c->c2.= to_link, &gc));
@@ -1789,10 +1790,12 @@
int size_delta =3D 0;


= /* If Socks5 over UDP, prepend header */
- socks_preprocess_outgoin= g_link(c, &to_addr, &size_delta);
+ socks_preprocess_outgoing_link(c, ls,= &to_addr, &size_delta);

= /* Send packet */
- size =3D (int)link_socket_write(c->c2.link_socket, = &c->c2.to_link, to_addr);
+ size =3D (int)link_socket_write(ls,
= + = &c->c2.to_link,
+ to_addr);
=
/* Undo effect of prepend */
link_socket_write_post_size_adjust(&size, s= ize_delta, &c->c2.to_link);
@@ -1821,7 +1824,7 @@

/* Check return status */ error_code =3D openvpn_errno();
- check_status(size, "write", c-= >c2.link_socket, NULL);
+ check_status(size, "write", ls, NULL);
<= span>

if (size > 0)
{=
@@ -2257,7 +2260,7 @@
}
=
void
= -process_io(struct context *c)
+process_io(struct context *c, struct link_socket *ls)
= {
const unsigned int status =3D c->c2.event_= set_status;

@@ -2272,7 +2275,7 @@<= br> /* TCP/UDP port ready to accept write */
= if (status & SOCKET_WRITE)
{
- process_outgoing_link(c);+ process_outgoing_lin= k(c, ls);
}
/* TUN device ready t= o accept write */
else if (status & TUN_WRITE)
@@ -2282,10 +2285,10 @@
/* Incoming data = on TCP/UDP port */
else if (status & SOCKET_READ)<= /span>
{
= - read_incoming_link(c);
+ read_incoming_link(c, ls);
if = (!IS_SIG(c))
{
- process_incoming_link(c);
+ process_incoming_link(c, ls= );
}
}
/= * Incoming data on TUN device */
diff --git a/src/openvpn/f= orward.h b/src/openvpn/forward.h
index 422c591..f656634 100= 644
--- a/src/openvpn/forward.h
+++ b/src/o= penvpn/forward.h
@@ -72,7 +72,8 @@
=
void pre_select(struct context *c);

= -void process_io(struct context *= c);
+void process_io(= struct context *ci, struct link_socket *ls);
+

/*************= *********************************************************/
= /**
@@ -128,10 +129,11 @@
* context asso= ciated with the appropriate VPN tunnel for which data is
= * available to be read.
*
- * @param c - The context structure which contains th= e external
- * netw= ork socket from which to read incoming packets.
+ * @param c The context structure which cont= ains the external
+ *= network socket from which to read incoming packets.
= + * @param ls The socket wher= e the packet can be read from.
*/
-void read_incoming_link(struct context *c);=
+void read_incoming_= link(struct context *c, struct link_socket *ls);
/**
* Starts processing a packet read from the e= xternal network interface.
@@ -197,10 +199,11 @@
= *
* If an error occurs, it is logged and the pack= et is dropped.
*
- * @param c - The context structure of the VPN tunnel associat= ed with the
- * pac= ket.
+ * @param c T= he context structure of the VPN tunnel associated with the
+ * packet.
+ * @param ls The socket to be use= d to send the packet.

*/
-void process_outgoing_link(struct context *c);<= br>+void process_outgoing_link(= struct context *c, struct link_socket *ls);


/****************************************************= **********************/
diff --git a/src/openvpn/mtcp.c b/s= rc/openvpn/mtcp.c
index e47712a..c699e6e 100644
<= span>--- a/src/openvpn/mtcp.c

+++ b/src/openvpn/mtcp.c
@@ -484,7 +484,7 @@
ASSERT(mi);
ASSERT(mi->context.c2.link_socket); set_prefix(mi);
- read_incoming_link(&mi->context);+ read_incoming_li= nk(&mi->context, mi->context.c2.link_socket);
= clear_prefix();
if (!IS_SIG(&mi-= >context))
{
diff --git a/s= rc/openvpn/mudp.c b/src/openvpn/mudp.c
index 268b430..e0911= 1f 100644
--- a/src/openvpn/mudp.c
+++ b/sr= c/openvpn/mudp.c
@@ -317,7 +317,7 @@
= msg_set_prefix("Connection Attempt");
= m->top.c2.to_link =3D m->hmac_reply;
m->= top.c2.to_link_addr =3D m->hmac_reply_dest;
- process_outgoing_link(&m->top);
+ process_outgoin= g_link(&m->top, &m->top.c2.link_socket[0]);
= m->hmac_reply_dest =3D NULL;
}
}

@@ -380,7 +380,7 @@
/* Incoming= data on UDP port */
else if (status & SOCKET_READ= )
{
+ read_incoming_link(&m->top, m->= ;top.c2.link_socket);
if (!IS_SIG(&m->top))=
{
multi_process_inco= ming_link(m, NULL, mpp_flags);
diff --git a/src/openvpn/mul= ti.h b/src/openvpn/multi.h
index e403989..8e961ea 100644
--- a/src/openvpn/multi.h
+++ b/src/openvpn/m= ulti.h
@@ -678,7 +678,7 @@
{
bool ret =3D true;

set_prefix(mi);
<= span style=3D"color: hsl(0, 100%, 40%);">- process_outgoing_link(&mi= ->context);

+ p= rocess_outgoing_link(&mi->context, mi->context.c2.link_socket);
ret =3D multi_process_post(m, mi, mpp_flags); clear_prefix();
return ret;
diff --git a/src/openvpn/openvpn.c b/src/openvpn/openvpn.c

index 16147b7..1db5422 100644

--- a/src/openvpn/openvpn.c=
+++ b/src/openvpn/openvpn.c
@@ -91,7 +91,7= @@
}

/= * process the I/O which triggered select */
- process_io(c);
+ process_io(c, c->c2.link_socket);
P2P_CHECK_SIG();

= perf_pop();
diff --git a/src/openvpn/socket.c b/src/op= envpn/socket.c
index 924e30c..302b106 100644
--- a/src/openvpn/socket.c

+++ b/src/openvpn/socket.c
@@ -1828,6 +1828,7 @@
sock->sd =3D SOC= KET_UNDEFINED;
sock->ctrl_sd =3D SOCKET_UNDEFINED;<= /span>
sock->ev_arg.type =3D EVENT_ARG_LINK_SOCKET;=
+ sock->ev_arg.u.ls = =3D sock;

return sock;
}


To view, visit change 758. To unsubscr= ibe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I8eae2d3356bbcc5d632eeb4fbe8= 0de8009d9b40d
Gerrit-Change-Number: 758
Gerrit-PatchSet: 1
Gerrit-Owner: its_Giaan <gianmarco@...2786...= ..>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: ordex <a@...2181...>
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 <a@...2181...> <= /div>
Gerrit-MessageType: newchange
--ZZU+JF2Lwy8=--