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/+/1245?usp=email

to review the following change.


Change subject: PUSH_UPDATE: disabling PUSH_UPDATE server if DCO is enabled
......................................................................

PUSH_UPDATE: disabling PUSH_UPDATE server if DCO is enabled

Change-Id: Ibe78949435bb2f26ad68301e2710321bf37c9486
Signed-off-by: Marco Baffo <[email protected]>
---
M src/openvpn/push_util.c
1 file changed, 16 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/45/1245/1

diff --git a/src/openvpn/push_util.c b/src/openvpn/push_util.c
index 9138bdb..f765936 100644
--- a/src/openvpn/push_util.c
+++ b/src/openvpn/push_util.c
@@ -294,10 +294,17 @@
         }                                                             \
     } while (0)

-
 bool
 management_callback_send_push_update_broadcast(void *arg, const char *options)
 {
+    struct multi_context *m = arg;
+    if (dco_enabled(&m->top.options))
+    {
+        msg(M_WARN, "WARN: PUSH_UPDATE messages cannot currently be sent while 
DCO is enabled."
+                    " To send a PUSH_UPDATE message, be sure to use the 
`--disable-dco` option.");
+        return false;
+    }
+
     int n_sent = send_push_update(arg, NULL, options, UPT_BROADCAST, 
PUSH_BUNDLE_SIZE);

     RETURN_UPDATE_STATUS(n_sent);
@@ -306,6 +313,14 @@
 bool
 management_callback_send_push_update_by_cid(void *arg, unsigned long cid, 
const char *options)
 {
+    struct multi_context *m = arg;
+    if (dco_enabled(&m->top.options))
+    {
+        msg(M_WARN, "WARN: PUSH_UPDATE messages cannot currently be sent while 
DCO is enabled."
+                    " To send a PUSH_UPDATE message, be sure to use the 
`--disable-dco` option.");
+        return false;
+    }
+
     int n_sent = send_push_update(arg, &cid, options, UPT_BY_CID, 
PUSH_BUNDLE_SIZE);

     RETURN_UPDATE_STATUS(n_sent);

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1245?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: Ibe78949435bb2f26ad68301e2710321bf37c9486
Gerrit-Change-Number: 1245
Gerrit-PatchSet: 1
Gerrit-Owner: mrbff <[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]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to