| 1756 | } |
| 1757 | |
| 1758 | CtPtr ProtocolV2::send_auth_request(std::vector<uint32_t> &allowed_methods) { |
| 1759 | ceph_assert(messenger->auth_client); |
| 1760 | ldout(cct, 20) << __func__ << " peer_type " << (int)connection->peer_type |
| 1761 | << " auth_client " << messenger->auth_client << dendl; |
| 1762 | |
| 1763 | ceph::bufferlist bl; |
| 1764 | std::vector<uint32_t> preferred_modes; |
| 1765 | auto am = auth_meta; |
| 1766 | connection->lock.unlock(); |
| 1767 | int r = messenger->auth_client->get_auth_request( |
| 1768 | connection, am.get(), |
| 1769 | &am->auth_method, &preferred_modes, &bl); |
| 1770 | connection->lock.lock(); |
| 1771 | if (state != AUTH_CONNECTING) { |
| 1772 | ldout(cct, 1) << __func__ << " state changed!" << dendl; |
| 1773 | return _fault(); |
| 1774 | } |
| 1775 | if (r < 0) { |
| 1776 | ldout(cct, 0) << __func__ << " get_initial_auth_request returned " << r |
| 1777 | << dendl; |
| 1778 | stop(); |
| 1779 | connection->dispatch_queue->queue_reset(connection); |
| 1780 | return nullptr; |
| 1781 | } |
| 1782 | |
| 1783 | INTERCEPT(9); |
| 1784 | |
| 1785 | auto frame = AuthRequestFrame::Encode(auth_meta->auth_method, preferred_modes, |
| 1786 | bl); |
| 1787 | return WRITE(frame, "auth request", read_frame); |
| 1788 | } |
| 1789 | |
| 1790 | CtPtr ProtocolV2::handle_auth_bad_method(ceph::bufferlist &payload) { |
| 1791 | ldout(cct, 20) << __func__ |
nothing calls this directly
no test coverage detected