From: Remi Gacogne Date: Thu, 7 Jan 2021 09:32:44 +0000 (+0100) Subject: rec: Set the Protocol Buffer 'inBytes' field for zero-length messages X-Git-Tag: rec-4.5.0-alpha1~35^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4de50c91d1ac5955abd7fb1452b81e3ca579b7f;p=thirdparty%2Fpdns.git 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. --- 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()