From c4de50c91d1ac5955abd7fb1452b81e3ca579b7f Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 7 Jan 2021 10:32:44 +0100 Subject: [PATCH] rec: Set the Protocol Buffer 'inBytes' field for zero-length messages Th existing Protocol Buffer code used to do that, so existing receivers might expect that field to be present. --- pdns/protozero.hh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pdns/protozero.hh b/pdns/protozero.hh index a9cdfd8589..f5e2d150be 100644 --- a/pdns/protozero.hh +++ b/pdns/protozero.hh @@ -87,9 +87,7 @@ namespace pdns { void setInBytes(uint64_t len) { - if (len) { - add_uint64(d_message, Field::inBytes, len); - } + add_uint64(d_message, Field::inBytes, len); } void setTime() -- 2.47.2