[socket] Fix getpeername() returning local address instead of remote in LWIP raw TCP (#12475)
This commit is contained in:
committed by
Jonathan Swoboda
parent
8cf0ee38a3
commit
7216120bfd
@@ -188,7 +188,7 @@ class LWIPRawImpl : public Socket {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
return this->ip2sockaddr_(&pcb_->local_ip, pcb_->local_port, name, addrlen);
|
||||
return this->ip2sockaddr_(&pcb_->remote_ip, pcb_->remote_port, name, addrlen);
|
||||
}
|
||||
std::string getpeername() override {
|
||||
if (pcb_ == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user