]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgwlc: fix conditional decode of legacy lc op structures 36474/head
authorMatt Benjamin <mbenjamin@redhat.com>
Wed, 5 Aug 2020 14:45:45 +0000 (10:45 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Wed, 5 Aug 2020 14:45:45 +0000 (10:45 -0400)
Fixes the case where an upgraded radosgw operates on an unupgraded
OSD, so likely these cases do not execute.

Fixes: https://tracker.ceph.com/issues/46838
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/cls/rgw/cls_rgw_ops.h

index ae02c192ecaad580039131dd3b59bf23a0dc1f03..a1800a834b4eb79b18cc80c52ebe4d314527204a 100644 (file)
@@ -1043,7 +1043,7 @@ struct cls_rgw_lc_get_next_entry_ret {
 
   void decode(ceph::buffer::list::const_iterator& bl) {
     DECODE_START(2, bl);
-    if (struct_v < 1) {
+    if (struct_v < 2) {
       std::pair<std::string, int> oe;
       decode(oe, bl);
       entry = {oe.first, 0 /* start */, uint32_t(oe.second)};
@@ -1109,7 +1109,7 @@ struct cls_rgw_lc_rm_entry_op {
 
   void decode(ceph::buffer::list::const_iterator& bl) {
     DECODE_START(2, bl);
-    if (struct_v < 1) {
+    if (struct_v < 2) {
       std::pair<std::string, int> oe;
       decode(oe, bl);
       entry = {oe.first, 0 /* start */, uint32_t(oe.second)};
@@ -1133,7 +1133,7 @@ struct cls_rgw_lc_set_entry_op {
 
   void decode(ceph::buffer::list::const_iterator& bl) {
     DECODE_START(2, bl);
-    if (struct_v < 1) {
+    if (struct_v < 2) {
       std::pair<std::string, int> oe;
       decode(oe, bl);
       entry = {oe.first, 0 /* start */, uint32_t(oe.second)};