Attention is currently required from: flichtenheld, plaisthos.
Hello plaisthos, flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1364?usp=email
to review the following change.
Change subject: multi-socket: do not return tuntap flags on server-side
......................................................................
multi-socket: do not return tuntap flags on server-side
Tuntap flags are already handled within
multi_io_process_io() so return them by
multi_io_process_flags() would be redoundant,
since we need them only for tun_set().
While at it, removed part of the I/O process
from multi_process_io_udp() since those are
also handled within multi_io_process_io().
Change-Id: I6a5110a0583b8b33496b06d9c27c1084df38e842
Signed-off-by: Gianmarco De Gregori <[email protected]>
---
M src/openvpn/forward.c
M src/openvpn/mudp.c
2 files changed, 3 insertions(+), 57 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/64/1364/1
diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index c355f66..211cdc8 100644
--- a/src/openvpn/forward.c
+++ b/src/openvpn/forward.c
@@ -2158,10 +2158,10 @@
void
get_io_flags_dowork_udp(struct context *c, struct multi_io *multi_io, const
unsigned int flags)
{
- unsigned int out_socket, out_tuntap;
+ unsigned int out_socket;
- multi_io_process_flags(c, multi_io->es, flags, &out_socket, &out_tuntap);
- multi_io->udp_flags = out_socket | out_tuntap;
+ multi_io_process_flags(c, multi_io->es, flags, &out_socket, NULL);
+ multi_io->udp_flags = (out_socket << SOCKET_SHIFT);
}
void
diff --git a/src/openvpn/mudp.c b/src/openvpn/mudp.c
index 31134be..71c742f 100644
--- a/src/openvpn/mudp.c
+++ b/src/openvpn/mudp.c
@@ -354,39 +354,14 @@
{
strcat(buf, "SW/");
}
- else if (status & TUN_READ)
- {
- strcat(buf, "TR/");
- }
- else if (status & TUN_WRITE)
- {
- strcat(buf, "TW/");
- }
- else if (status & FILE_CLOSED)
- {
- strcat(buf, "FC/");
- }
printf("IO %s\n", buf);
#endif /* ifdef MULTI_DEBUG_EVENT_LOOP */
-#ifdef ENABLE_MANAGEMENT
- if (status & (MANAGEMENT_READ | MANAGEMENT_WRITE))
- {
- ASSERT(management);
- management_io(management);
- }
-#endif
-
/* UDP port ready to accept write */
if (status & SOCKET_WRITE)
{
multi_process_outgoing_link(m, mpp_flags);
}
- /* TUN device ready to accept write */
- else if (status & TUN_WRITE)
- {
- multi_process_outgoing_tun(m, mpp_flags);
- }
/* Incoming data on UDP port */
else if (status & SOCKET_READ)
{
@@ -396,35 +371,6 @@
multi_process_incoming_link(m, NULL, mpp_flags, sock);
}
}
- /* Incoming data on TUN device */
- else if (status & TUN_READ)
- {
- read_incoming_tun(&m->top);
- if (!IS_SIG(&m->top))
- {
- multi_process_incoming_tun(m, mpp_flags);
- }
- }
-#ifdef ENABLE_ASYNC_PUSH
- /* INOTIFY callback */
- else if (status & FILE_CLOSED)
- {
- multi_process_file_closed(m, mpp_flags);
- }
-#endif
-#if defined(ENABLE_DCO)
- else if (status & DCO_READ)
- {
- if (!IS_SIG(&m->top))
- {
- bool ret = true;
- while (ret)
- {
- ret = multi_process_incoming_dco(m);
- }
- }
- }
-#endif
m->multi_io->udp_flags = ES_ERROR;
}
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1364?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6a5110a0583b8b33496b06d9c27c1084df38e842
Gerrit-Change-Number: 1364
Gerrit-PatchSet: 1
Gerrit-Owner: its_Giaan <[email protected]>
Gerrit-Reviewer: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel