]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg/async, v2: get rid of magic number in SignedEncryptedFrame.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 20 Feb 2019 01:24:24 +0000 (02:24 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 21 Feb 2019 22:31:03 +0000 (23:31 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/msg/async/ProtocolV2.cc

index ae373436bb9fdd8c53c018f5a3ff63c733d2f38a..b3f47d2d39d130b6ead1325473d86b863b80cc81 100644 (file)
@@ -385,7 +385,8 @@ struct SignedEncryptedFrame : public PayloadFrame<T, Args...> {
     ceph::bufferlist plain_bl = \
       protocol.session_stream_handlers.rx->authenticated_decrypt_update_final(
         std::move(bl), ProtocolV2::segment_t::DEFAULT_ALIGNMENT);
-    ceph_assert(plain_bl.length() + 16 == length);
+    ceph_assert(plain_bl.length() == length - \
+       protocol.session_stream_handlers.rx->get_extra_size_at_final());
     this->decode_frame(plain_bl.c_str(), plain_bl.length());
   }
 };