See #50835.
In crimson, conn is independently maintained outside Message.
Therefore, when trying to use the message's connection for `get_peer_addr()`
we won't be able to get the peer address.
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit
9c1531ca404582725bfcb758dd489626fda31454)
return reply_op_error(pg, -ENAMETOOLONG);
} else if (m->get_hobj().oid.name.empty()) {
return reply_op_error(pg, -EINVAL);
- } else if (pg->get_osdmap()->is_blocklisted(m->get_source_addr())) {
- logger().info("{} is blocklisted", m->get_source_addr());
+ } else if (pg->get_osdmap()->is_blocklisted(conn->get_peer_addr())) {
+ logger().info("{} is blocklisted", conn->get_peer_addr());
return reply_op_error(pg, -EBLOCKLISTED);
}