From: "plaisthos (Code Review)" Date: Thu, 10 Aug 2023 13:51:28 +0000 References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <5b489d868a80cf1c3bb6325df28aa79891c824d5-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="kP5ANq9ZLWw="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: Add warning if a p2p NCP client connects to a p2mp server List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld Cc: openvpn-devel --kP5ANq9ZLWw= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/323?usp=3Demail to review the following change. Change subject: Add warning if a p2p NCP client connects to a p2mp server ...................................................................... Add warning if a p2p NCP client connects to a p2mp server Change-Id: I85ae4e1167e1395b4f59d5d0ecf6c38befcaa8a7 --- M src/openvpn/ssl_ncp.c M src/openvpn/ssl_ncp.h 2 files changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/23/323/1 diff --git a/src/openvpn/ssl_ncp.c b/src/openvpn/ssl_ncp.c index dafaef1..aae04e2 100644 --- a/src/openvpn/ssl_ncp.c +++ b/src/openvpn/ssl_ncp.c @@ -24,7 +24,7 @@ */ /** - * @file Control Channel SSL/Data dynamic negotion Module + * @file Control Channel SSL/Data dynamic negotiation Module * This file is split from ssl.c to be able to unit test it. */ @@ -267,6 +267,13 @@ remote_cipher =3D ""; } + if (extract_iv_proto(peer_info) & IV_PROTO_NCP_P2P) + { + msg(M_WARN, "Note: peer reports running in P2P mode (no --pull/--c= lient" + "option). It will not negotiate ciphers with this server. " + "Expect this connection to fail."); + } + char *tmp_ciphers =3D string_alloc(server_list, &gc_tmp); const char *token; diff --git a/src/openvpn/ssl_ncp.h b/src/openvpn/ssl_ncp.h index d27ed24..de7a0e4 100644 --- a/src/openvpn/ssl_ncp.h +++ b/src/openvpn/ssl_ncp.h @@ -23,7 +23,7 @@ */ /** - * @file Control Channel SSL/Data dynamic negotion Module + * @file Control Channel SSL/Data dynamic negotiation Module * This file is split from ssl.h to be able to unit test it. */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/323?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I85ae4e1167e1395b4f59d5d0ecf6c38befcaa8a7 Gerrit-Change-Number: 323 Gerrit-PatchSet: 1 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld Gerrit-MessageType: newchange --kP5ANq9ZLWw= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld.

plaisthos would like flichtenheld to review this change.

Vi= ew Change

Add warning if a p2p NCP client connects to a p2mp server
=
Change-Id: I85ae4e1167e1395b4f59d5d0ecf6c38befcaa8a7
---
M src/op= envpn/ssl_ncp.c
M src/openvpn/ssl_ncp.h
2 files changed, 9 insertions= (+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openv=
pn refs/changes/23/323/1
diff --git a/src/openvpn/ssl_ncp.c b/src/o=
penvpn/ssl_ncp.c
index dafaef1..aae04e2 100644
--- a/src/openvpn/ssl_ncp.c
+++ b/src/openvpn/ssl_ncp.c=
@@ -24,7 +24,7 @@
*/

/**
- *= @file Control Channel SSL/Data dynamic negotion Module
+ * @file Control Channel SSL/Data dynam= ic negotiation Module
* This file is split from ssl.c to = be able to unit test it.
*/

<= span>@@ -267,6 +267,13 @@

remote_cipher =3D "= ";
}

+ if (extract_iv_proto(peer_info) & IV_P= ROTO_NCP_P2P)
+ {<= /span>
+ msg(M_WARN, = "Note: peer reports running in P2P mode (no --pull/--client"
+ "option= ). It will not negotiate ciphers with this server. "
+ "Expect this connect= ion to fail.");
= + }
+
char *tmp_ciphers =3D string_alloc(server_list, &gc_tmp);

const char *token;
diff = --git a/src/openvpn/ssl_ncp.h b/src/openvpn/ssl_ncp.h
index= d27ed24..de7a0e4 100644
--- a/src/openvpn/ssl_ncp.h=
+++ b/src/openvpn/ssl_ncp.h
@@ -23,7 +23,7 @@
*/

/**
- * @file Control Channel SSL/Data dynami= c negotion Module
+ *= @file Control Channel SSL/Data dynamic negotiation Module
= * This file is split from ssl.h to be able to unit test it.
*/



To view, visi= t change = 323. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I85ae4e1167e1395b4f59d5d0ecf= 6c38befcaa8a7
Gerrit-Change-Number: 323
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newchange
--kP5ANq9ZLWw=--