]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Set the Protocol Buffer 'inBytes' field for zero-length messages 9917/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 7 Jan 2021 09:32:44 +0000 (10:32 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 7 Jan 2021 09:32:44 +0000 (10:32 +0100)
Th existing Protocol Buffer code used to do that, so existing receivers
might expect that field to be present.

pdns/protozero.hh

index a9cdfd85893949529f535509107444a501adafc2..f5e2d150be5e1b73577dc377f303c720e1d7679a 100644 (file)
@@ -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()