Message decode issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Cephers,

below is a piece of code in Message::decode_message:
```
// m->header.version, if non-zero, should be populated with the
  // newest version of the encoding the code supports.  If set, check
  // it against compat_version.
  if (m->get_header().version &&
      m->get_header().version < header.compat_version) {
    if (cct) {
      ldout(cct, 0) << "will not decode message of type " << type
                    << " version " << header.version
                    << " because compat_version " << header.compat_version
                    << " > supported version " << m->get_header().version << dendl;
      if (cct->_conf->ms_die_on_bad_msg)
        ceph_abort();
    }   
    m->put();
    return 0;
  }
```
I know it’s checking the compatibility of the incoming message.
but, i think it’s not sufficient, it only checked if the coming message’s compat_version is bigger than our version (if it’s true, the message is not supported)
it should also check if the comming message’s version  is smaller than our compat_version, right ?
please correct me if i’m wrong.

Regards,
Dongdong--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux