This ensures we reencode the payload with the
appropriate set of features if the client, us, or the
target do not have identical features. Otherwise we
may forward an encoding with more features than the
target can handle.
Signed-off-by: Sage Weil <sage@redhat.com>
// message are changed when reencoding with more features than the
// client had originally. That should never happen, but we may as
// well be defensive here.
+ if (con_features != features) {
+ msg->clear_payload();
+ }
encode_message(msg, features & con_features, payload);
::encode(con_features, payload);
::encode(entity_name, payload);