for (j=iface_count() - 1;
j >= 0;
j--) {
- struct in_addr *bcast = iface_n_bcast(j);
+ const struct in_addr *bcast = iface_n_bcast_v4(j);
+ if (!bcast) {
+ continue;
+ }
return_ip = name_query(fd,name,0x20,True,True,*bcast,count, &flags, NULL);
if (return_ip) {
break;