Attention is currently required from: Arne Schwabe.

Hello Arne Schwabe,

I'd like you to do a code review.
Please visit

    https://gerrit.openvpn.net/c/openvpn/+/2172?usp=email

to review the following change.


Change subject: init: close AF_UNIX tun on SIGUSR1 with --persist-tun
......................................................................

init: close AF_UNIX tun on SIGUSR1 with --persist-tun

can_preserve_tun() never keeps an AF_UNIX tun, but do_close_tun()
skipped closing it on SIGUSR1 with --persist-tun. do_open_tun() then
reopened over it, leaking the socket fd and actual_name and leaving
the old child process running.

Change-Id: I19904af95d0b9efa868d42050f7187565c7f7a23
Signed-off-by: Razvan Cojocaru <[email protected]>
---
M src/openvpn/init.c
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/72/2172/1

diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index 3bc4de4..7ac4803 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -2044,7 +2044,9 @@

     run_dns_up_down(false, &c->options, c->c1.tuntap, &c->persist.duri);

-    if (force || !(c->sig->signal_received == SIGUSR1 && 
c->options.persist_tun))
+    /* AF_UNIX tun is never preserved, see can_preserve_tun() */
+    if (force || !(c->sig->signal_received == SIGUSR1 && 
c->options.persist_tun)
+        || c->c1.tuntap->backend_driver == DRIVER_AFUNIX)
     {
         static_context = NULL;


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

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I19904af95d0b9efa868d42050f7187565c7f7a23
Gerrit-Change-Number: 2172
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to