Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
beef9999 committed Sep 28, 2023
1 parent e672b9f commit 3b20684
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/kernel_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ class KernelSocketServer : public SocketServerBase {
}

int bind(uint16_t port, IPAddr addr) override {
if (m_socket_family == AF_INET6 && addr.empty()) {
addr = IPAddr::V6Any();
}
sockaddr_storage s{};
auto ep = EndPoint(addr, port);
return ::bind(m_listen_fd, ep.get_sockaddr(s), ep.get_sockaddr_len());
Expand Down

0 comments on commit 3b20684

Please sign in to comment.