mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
crimson/net: fix peer_addr sync in during handshake
Signed-off-by: Yingxin <yingxin.cheng@intel.com>
This commit is contained in:
parent
c48de27480
commit
bee7be532d
@ -801,8 +801,7 @@ seastar::future<> SocketConnection::client_handshake(entity_type_t peer_type,
|
||||
validate_peer_addr(saddr, peer_addr);
|
||||
|
||||
if (my_addr != caddr) {
|
||||
// take peer's address for me, but preserve my port/nonce
|
||||
caddr.set_port(my_addr.get_port());
|
||||
// take peer's address for me, but preserve my nonce
|
||||
caddr.nonce = my_addr.nonce;
|
||||
my_addr = caddr;
|
||||
}
|
||||
|
@ -73,6 +73,7 @@ seastar::future<> SocketMessenger::accept(seastar::connected_socket socket,
|
||||
{
|
||||
// allocate the connection
|
||||
entity_addr_t peer_addr;
|
||||
peer_addr.set_type(entity_addr_t::TYPE_DEFAULT);
|
||||
peer_addr.set_sockaddr(&paddr.as_posix_sockaddr());
|
||||
ConnectionRef conn = new SocketConnection(this, get_myaddr(),
|
||||
peer_addr, std::move(socket));
|
||||
|
Loading…
Reference in New Issue
Block a user