]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
libcephfs_proxy: fix protocol structures for backward compatibility
authorXavi Hernandez <xhernandez@gmail.com>
Mon, 1 Sep 2025 09:22:05 +0000 (11:22 +0200)
committerXavi Hernandez <xhernandez@gmail.com>
Tue, 9 Sep 2025 13:12:35 +0000 (15:12 +0200)
commit62e917148496bce299f4cd48342765b73b9950a8
treefdbeb3630156efaa2ee71a107cfcecb73e2c4881
parentcdb6321adefbff408c15a18a515e85b51ab12b37
libcephfs_proxy: fix protocol structures for backward compatibility

The structures used for transferring data between the proxy client and
the proxy daemon had been reworked in a recent change to be able to
expand the protocol. This caused an inconsistency in the size of the
data transferred when communication with a peer using the older version.
The result was that the peer receiving the data with an unexpected size
was closing the connection, causing unexpected errors.

The discrepancy in size is the result of how compilers pad structures
combined with the change in the structure layout introduced when
extending the protocol. With these changes, the computation of the size
of each version of the structures was not done correctly.

This change makes the layout equal to the older version, so that
computing the size of the structures becomes easier and doesn't depend
on unexpected paddings.

Fixes: https://tracker.ceph.com/issues/72800
Signed-off-by: Xavi Hernandez <xhernandez@gmail.com>
src/libcephfs_proxy/proxy_requests.h