]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: set connection policy for v1 protocol
authorYingxin Cheng <yingxin.cheng@intel.com>
Tue, 16 Jul 2019 08:18:14 +0000 (16:18 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Wed, 17 Jul 2019 08:37:04 +0000 (16:37 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/net/ProtocolV1.cc

index b9805b4889ea39b811e2a96894d4409a7319cbb1..0c28ff47949275b28f6e5aa5ac06cb7acc059063 100644 (file)
@@ -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<SocketConnection>(conn.shared_from_this()));
   seastar::with_gate(pending_dispatch, [this] {
@@ -539,6 +540,7 @@ seastar::future<stop_t> 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));