[socket] Fix getpeername() returning local address instead of remote in LWIP raw TCP

This commit is contained in:
J. Nick Koston
2025-12-13 22:49:05 -06:00
parent e0ce66e011
commit 512a7df007
@@ -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) {