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/+/813?usp=email
to review the following change.
Change subject: dco-win: simplity do_close_link_socket()
......................................................................
dco-win: simplity do_close_link_socket()
c->c2.link_socket_owned is true in client mode
and for the global context in the server mode -
those are exactly the cases when we want to
set sd to undefined when using dco-win.
Change-Id: I3232dd8d855ca3f198b4ca3b2ef4f67cec49f3d4
Signed-off-by: Lev Stipakov <[email protected]>
---
M src/openvpn/init.c
1 file changed, 8 insertions(+), 8 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/13/813/1
diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index 9371024..656fedf 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -3940,16 +3940,16 @@
static void
do_close_link_socket(struct context *c)
{
- /* in dco-win case, link socket is a tun handle which is
- * closed in do_close_tun(). Set it to UNDEFINED so
- * we won't use WinSock API to close it. */
- if (tuntap_is_dco_win(c->c1.tuntap) && c->c2.link_socket)
- {
- c->c2.link_socket->sd = SOCKET_UNDEFINED;
- }
-
if (c->c2.link_socket && c->c2.link_socket_owned)
{
+ /* in dco-win case, link socket is a tun handle which is
+ * closed in do_close_tun(). Set it to UNDEFINED so
+ * we won't use WinSock API to close it. */
+ if (tuntap_is_dco_win(c->c1.tuntap))
+ {
+ c->c2.link_socket->sd = SOCKET_UNDEFINED;
+ }
+
link_socket_close(c->c2.link_socket);
c->c2.link_socket = NULL;
}
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/813?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: I3232dd8d855ca3f198b4ca3b2ef4f67cec49f3d4
Gerrit-Change-Number: 813
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <[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]>
Gerrit-MessageType: newchange
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel