From: Yingxin Cheng Date: Tue, 16 Jul 2019 08:18:14 +0000 (+0800) Subject: crimson/net: set connection policy for v1 protocol X-Git-Tag: v15.1.0~2161^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bce34845ca091db50319e634171248307a554a01;p=ceph.git crimson/net: set connection policy for v1 protocol Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/net/ProtocolV1.cc b/src/crimson/net/ProtocolV1.cc index b9805b4889ea..0c28ff479492 100644 --- a/src/crimson/net/ProtocolV1.cc +++ b/src/crimson/net/ProtocolV1.cc @@ -330,6 +330,7 @@ void ProtocolV1::start_connect(const entity_addr_t& _peer_addr, ceph_assert(!socket); conn.peer_addr = _peer_addr; conn.set_peer_type(_peer_type); + conn.policy = messenger.get_policy(_peer_type); messenger.register_conn( seastar::static_pointer_cast(conn.shared_from_this())); seastar::with_gate(pending_dispatch, [this] { @@ -539,6 +540,7 @@ seastar::future ProtocolV1::repeat_handle_connect() auto p = bl.cbegin(); ::decode(h.connect, p); conn.set_peer_type(h.connect.host_type); + conn.policy = messenger.get_policy(h.connect.host_type); return socket->read(h.connect.authorizer_len); }).then([this] (bufferlist authorizer) { memset(&h.reply, 0, sizeof(h.reply));