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/+/1273?usp=email
to review the following change.
Change subject: init: Fix datav2_enabled check in options import
......................................................................
init: Fix datav2_enabled check in options import
peer_id is unsigned, so the previous check was partly
useless. Instead check use_peer_id.
Change-Id: Ia713a2ecfcad7032863867630a0c306ff9f90385
Signed-off-by: Frank Lichtenheld <[email protected]>
---
M src/openvpn/init.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/73/1273/1
diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index aaa0573..aa2611d 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -2728,8 +2728,8 @@
/* Ensure that for epoch data format is only enabled if also data v2
* is enabled */
- bool epoch_data = (c->options.imported_protocol_flags &
CO_EPOCH_DATA_KEY_FORMAT);
- bool datav2_enabled = (c->options.peer_id >= 0 && c->options.peer_id <
MAX_PEER_ID);
+ bool epoch_data = c->options.imported_protocol_flags &
CO_EPOCH_DATA_KEY_FORMAT;
+ bool datav2_enabled = c->options.use_peer_id && c->options.peer_id <
MAX_PEER_ID;
if (epoch_data && !datav2_enabled)
{
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1273?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: Ia713a2ecfcad7032863867630a0c306ff9f90385
Gerrit-Change-Number: 1273
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel