cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1680?usp=email )
Change subject: Fix: port-share and multi-socket interaction ...................................................................... Fix: port-share and multi-socket interaction When port-share is used, enforce the presence of a TCP listener by checking the local_list entries insted of rely on the global connection_entry proto field. Github: fixes OpenVPN/openvpn#1027 Change-Id: Id4e21efebbe64b963cf7847ad77bc41339af7a37 Signed-off-by: Gianmarco De Gregori <[email protected]> Acked-by: Frank Lichtenheld <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1680 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg36986.html Signed-off-by: Gert Doering <[email protected]> --- M src/openvpn/options.c 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 128d1e5..62c0bbb 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -2490,8 +2490,13 @@ msg(M_USAGE, USAGE_VALID_SERVER_PROTOS); } #if PORT_SHARE + bool has_tcp = false; + for (int i = 0; i < ce->local_list->len && !has_tcp; i++) + { + has_tcp = (ce->local_list->array[i]->proto == PROTO_TCP_SERVER); + } if ((options->port_share_host || options->port_share_port) - && (ce->proto != PROTO_TCP_SERVER)) + && !has_tcp) { msg(M_USAGE, "--port-share only works in TCP server mode " "(--proto values of tcp-server, tcp4-server, or tcp6-server)"); -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1680?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Id4e21efebbe64b963cf7847ad77bc41339af7a37 Gerrit-Change-Number: 1680 Gerrit-PatchSet: 2 Gerrit-Owner: its_Giaan <[email protected]> Gerrit-Reviewer: flichtenheld <[email protected]> Gerrit-Reviewer: plaisthos <[email protected]> Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
