@@ -1112,6 +1112,12 @@
}
else if (honor_received_options && buf_string_compare_advance(&buf, push_update_cmd))
{
+ if (dco_enabled(&c->options))
+ {
+ msg(M_WARN, "WARN: PUSH_UPDATE messages cannot currently be processed in client mode while DCO is enabled, ignoring."
+ " To be able to process PUSH_UPDATE messages, be sure to use the --disable-dco option.");
+ return PUSH_MSG_ERROR;
+ }
return process_incoming_push_update(c, permission_mask, option_types_found, &buf, false);
}
else
@@ -191,6 +191,13 @@
int
send_push_update(struct multi_context *m, const void *target, const char *msg, const push_update_type type, const int push_bundle_size)
{
+ 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 0;
+ }
+
if (!msg || !*msg || !m
|| (!target && type != UPT_BROADCAST))
{
@@ -294,7 +301,6 @@
} \
} while (0)
-
bool
management_callback_send_push_update_broadcast(void *arg, const char *options)
{
@@ -1926,8 +1926,12 @@
/* support for exit notify via control channel */
iv_proto |= IV_PROTO_CC_EXIT_NOTIFY;
- /* support push-updates */
- iv_proto |= IV_PROTO_PUSH_UPDATE;
+ /* currently push-update is not supported when DCO is enabled */
+ if (!session->opt->dco_enabled)
+ {
+ /* support push-updates */
+ iv_proto |= IV_PROTO_PUSH_UPDATE;
+ }
if (session->opt->pull)
{
@@ -465,6 +465,7 @@
m->instances = calloc(1, sizeof(struct multi_instance *));
struct multi_instance *mi = calloc(1, sizeof(struct multi_instance));
*(m->instances) = mi;
+ m->top.options.disable_dco = true;
*state = m;
return 0;
}