From: Yingxin Cheng Date: Mon, 11 Mar 2019 08:15:28 +0000 (+0800) Subject: crimson/net: add AuthConnectionMeta to Protocol X-Git-Tag: v15.1.0~3027^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a12875300aa66fb4f4a82581d40cf0b548f39f3d;p=ceph.git crimson/net: add AuthConnectionMeta to Protocol Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/net/Fwd.h b/src/crimson/net/Fwd.h index f47b61dc1c5f..c6b4b5c2e82e 100644 --- a/src/crimson/net/Fwd.h +++ b/src/crimson/net/Fwd.h @@ -23,6 +23,9 @@ using peer_type_t = int; using auth_proto_t = int; +class AuthConnectionMeta; +using AuthConnectionMetaRef = seastar::lw_shared_ptr; + namespace ceph::net { using msgr_tag_t = uint8_t; diff --git a/src/crimson/net/Protocol.cc b/src/crimson/net/Protocol.cc index 193918b867f8..f509ec28ec28 100644 --- a/src/crimson/net/Protocol.cc +++ b/src/crimson/net/Protocol.cc @@ -3,6 +3,8 @@ #include "Protocol.h" +#include "auth/Auth.h" + #include "crimson/common/log.h" #include "Socket.h" #include "SocketConnection.h" @@ -20,7 +22,9 @@ Protocol::Protocol(int type, SocketConnection& conn) : proto_type(type), dispatcher(dispatcher), - conn(conn) {} + conn(conn), + auth_meta{seastar::make_lw_shared()} +{} Protocol::~Protocol() { diff --git a/src/crimson/net/Protocol.h b/src/crimson/net/Protocol.h index 4777af3c634f..5d4a39496b8b 100644 --- a/src/crimson/net/Protocol.h +++ b/src/crimson/net/Protocol.h @@ -54,6 +54,7 @@ class Protocol { SocketFRef socket; seastar::gate pending_dispatch; + AuthConnectionMetaRef auth_meta; // write_state is changed with state atomically, indicating the write // behavior of the according state.