FS-5708 --resolve

This commit is contained in:
Anthony Minessale 2013-08-19 23:48:09 +05:00
parent 2541bd39aa
commit 2c6427ccb7
1 changed files with 1 additions and 1 deletions

View File

@ -1273,7 +1273,7 @@ static int get_netmask(struct sockaddr_in *me, int *mask)
struct sockaddr_in *s = (struct sockaddr_in *) i->ifa_addr;
struct sockaddr_in *m = (struct sockaddr_in *) i->ifa_netmask;
if (s && m && s->sin_addr.s_addr == me->sin_addr.s_addr) {
if (s && m && s->sin_family == AF_INET && s->sin_addr.s_addr == me->sin_addr.s_addr) {
*mask = m->sin_addr.s_addr;
freeifaddrs(ifaddrs);
return 0;