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/+/555?usp=email

to review the following change.


Change subject: Only schedule_exit() once
......................................................................

Only schedule_exit() once

If an exit has already been scheduled we should not schedule it again.
Otherwise, the exit signal is never emitted if the peer reschedules the
exit before the timeout occurs.

Change-Id: I9457f005f4ba970502e6b667d9dc4299a588d661
Signed-off-by: Reynir Björnsson <rey...@reynir.dk>
---
M src/openvpn/forward.c
1 file changed, 5 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/55/555/1

diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index 8d10f25..70f8e9d 100644
--- a/src/openvpn/forward.c
+++ b/src/openvpn/forward.c
@@ -519,6 +519,11 @@
 void
 schedule_exit(struct context *c, const int n_seconds, const int signal)
 {
+    /* don't reschedule if already scheduled; we drop the new signal, but it
+     * only ever seems to be SIGTERM anyway. */
+    if (event_timeout_defined(&c->c2.scheduled_exit)) {
+        return;
+    }
     tls_set_single_session(c->c2.tls_multi);
     update_time();
     reset_coarse_timers(c);

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/555?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9457f005f4ba970502e6b667d9dc4299a588d661
Gerrit-Change-Number: 555
Gerrit-PatchSet: 1
Gerrit-Owner: reynir <rey...@reynir.dk>
Gerrit-Reviewer: flichtenheld <fr...@lichtenheld.com>
Gerrit-Reviewer: plaisthos <arne-open...@rfc2549.org>
Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net>
Gerrit-Attention: plaisthos <arne-open...@rfc2549.org>
Gerrit-Attention: flichtenheld <fr...@lichtenheld.com>
Gerrit-MessageType: newchange
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to