use sockaddr_storage instead of sockaddr_in6

This commit is contained in:
Godmar Back 2018-04-29 17:57:43 -04:00
parent 960fec20f8
commit fc4135a79c

View File

@ -118,7 +118,7 @@ socket_accept_client(int accepting_socket)
* Using a struct sockaddr is too small to hold a full IPv6 address and accept() * Using a struct sockaddr is too small to hold a full IPv6 address and accept()
* would not return the full address. * would not return the full address.
*/ */
struct sockaddr_in6 peer; struct sockaddr_storage peer;
socklen_t peersize = sizeof(peer); socklen_t peersize = sizeof(peer);
int client = accept(accepting_socket, (struct sockaddr *) &peer, &peersize); int client = accept(accepting_socket, (struct sockaddr *) &peer, &peersize);