dht-bootstrap.c | 2 ++ diff --git a/dht-bootstrap.c b/dht-bootstrap.c index c9582b2c12cd6b090ed53fb95fefbd4cabb39ced..d96b0f7a763623dd93c53684ac3ca140d8248798 100644 --- a/dht-bootstrap.c +++ b/dht-bootstrap.c @@ -427,6 +427,7 @@ if(dht_socket >= 0) { struct sockaddr_in sin; int rc; memset(&sin, 0, sizeof(sin)); + sin.sin_family = AF_INET; sin.sin_port = htons(port); rc = bind(dht_socket, (struct sockaddr*)&sin, sizeof(sin)); if(rc < 0) { @@ -464,6 +465,7 @@ global IPv6 addresses. In this simple example, this only happens if the user used the -b flag. */ memset(&sin6, 0, sizeof(sin6)); + sin6.sin6_family = AF_INET6; sin6.sin6_port = htons(port); rc = bind(dht_socket6, (struct sockaddr*)&sin6, sizeof(sin6)); if(rc < 0) {