mirror of
https://github.com/ceph/ceph
synced 2025-02-24 19:47:44 +00:00
crimson/osd/osd_operations/client_request: Fix client blocklisting
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>
This commit is contained in:
parent
e87b2e0d60
commit
9c1531ca40
@ -272,8 +272,8 @@ ClientRequest::do_process(
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user