Change in openvpn[master]: Properly log peer-id in P2P mode
A message that is not in the archive (sent off-list or not yet received): gerrit.1764165538000.I80aed8a91259374d4b2b2155a8f47e286f2def75@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1406?usp=email
to review the following change.
Change subject: Properly log peer-id in P2P mode
......................................................................
Properly log peer-id in P2P mode
As of now OpenVPN prints o->peer_id in the deferred options log message, however in P2P mode that field is currently always 0 as it gets populated only when a peer-id is pushed by a server (which doesn't happen in P2P).
Fix this by populate o->peer_id before loggin it.
---
M src/openvpn/init.c
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/06/1406/1
src/openvpn/init.c +1 -0
@@ -2541,6 +2541,7 @@ } c->options.use_peer_id = c->c2.tls_multi->use_peer_id; + c->options.peer_id = c->c2.tls_multi->peer_id;struct tls_session *session = &c->c2.tls_multi->session[TM_ACTIVE ];
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1406?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I80aed8a91259374d4b2b2155a8f47e286f2def75
Gerrit-Change-Number: 1406
Gerrit-PatchSet: 1
Gerrit-Owner: its_Giaan <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: its_Giaan.
plaisthos has posted comments on this change by its_Giaan. ( http://gerrit.openvpn.net/c/openvpn/+/1406?usp=email )
Change subject: Properly log peer-id in P2P mode
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
File src/openvpn/init.c:
http://gerrit.openvpn.net/c/openvpn/+/1406/comment/682f07eb_14a75bba?usp=email :
PS1, Line 2544: c->options.peer_id = c->c2.tls_multi->peer_id;
I feel this the wrong fix. We seem to already do the wrong thing for use_peer_id but this seem to be more fixing the symptom that we somewhere look at options instead of the c2.tls_multi somehwere else in the code.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1406?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I80aed8a91259374d4b2b2155a8f47e286f2def75
Gerrit-Change-Number: 1406
Gerrit-PatchSet: 1
Gerrit-Owner: its_Giaan <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: its_Giaan <[email protected]...>
Gerrit-Comment-Date: Wed, 26 Nov 2025 18:19:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: plaisthos.
its_Giaan has posted comments on this change by its_Giaan. ( http://gerrit.openvpn.net/c/openvpn/+/1406?usp=email )
Change subject: Properly log peer-id in P2P mode
......................................................................
Patch Set 1:
(1 comment)
File src/openvpn/init.c:
http://gerrit.openvpn.net/c/openvpn/+/1406/comment/1cdc608c_a8b77cad?usp=email :
PS1, Line 2544: c->options.peer_id = c->c2.tls_multi->peer_id;
Quoted 1 line
I feel this the wrong fix. […]
Yeah I strongly agree, and we indeed look for options->peer_id in tls_print_deferred_options_results() in fact in the asym-peer-id patch I've arbitrary switched to tls_multi->peer_id, so if we're fine with that I will do the same, but as you can see the tls_print_deferred_options_results() talks about options so not sure.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1406?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I80aed8a91259374d4b2b2155a8f47e286f2def75
Gerrit-Change-Number: 1406
Gerrit-PatchSet: 1
Gerrit-Owner: its_Giaan <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Comment-Date: Wed, 26 Nov 2025 21:12:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: plaisthos <[email protected]...>
its_Giaan has abandoned this change. ( http://gerrit.openvpn.net/c/openvpn/+/1406?usp=email )
Change subject: Properly log peer-id in P2P mode
......................................................................
Abandoned
#1089 will fix this.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1406?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: abandon
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I80aed8a91259374d4b2b2155a8f47e286f2def75
Gerrit-Change-Number: 1406
Gerrit-PatchSet: 1
Gerrit-Owner: its_Giaan <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>