-
Notifications
You must be signed in to change notification settings - Fork 538
Description
I'm running MacOS 10.13.1. When I try to install CZMQ HEAD (with --enable-drafts
), either with Homebrew or manually, the make check-verbose
step fails with this:
Assertion failed: (rc == 0), function s_interface_new, file src/ziflist.c, line 95.
I tried to track the problem down and it seems that this assertion happens while reading the netmask information of my interface vboxnet2
. The function getnameinfo(netmask, ...)
returns error code EAI_FAMILY
. I printed netmask->sa_family
, and it is 0
(AF_UNSPEC
according to /usr/include/sys/socket.h). Since that netmask
is passed in as an argument, the error seems to be in the calling function s_reload()
, probably in the part that reads the netmask:
inaddr_t netmask = { 0 };
if (!ioctl (sock, SIOCGIFNETMASK, (caddr_t) ifr, sizeof (struct ifreq)))
netmask = *((inaddr_t *) &ifr->ifr_addr);
else
is_valid = false;
Now my C/systems programming knowledge is very limited. It seems that for an invalid/unsupported interface, it should simply set is_valid = false
and thus skip the s_interface_new()
call for that interface, but it doesn't.
What might be interesting is the information about my interface:
For this interface, it does not assert:
$ ifconfig -v en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 index 5
eflags=412008c0<ACCEPT_RTADV,TXSTART,ARPLL,NOACKPRI,ECN_ENABLE,FASTLN_ON>
ether 3c:15:c2:e3:e8:c4
inet6 fe80::c13:c221:c739:cd74%en0 prefixlen 64 secured scopeid 0x5
inet 192.168.178.21 netmask 0xffffff00 broadcast 192.168.178.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
type: Wi-Fi
link quality: 100 (good)
state availability: 0 (true)
scheduler: FQ_CODEL (driver managed)
uplink rate: 43.07 Mbps [eff] / 304.20 Mbps
downlink rate: 43.07 Mbps [eff] / 304.20 Mbps [max]
qosmarking enabled: yes mode: none
For this interface, it asserts:
$ ifconfig -v vboxnet2
vboxnet2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 index 16
eflags=41000000<ECN_ENABLE,FASTLN_ON>
ether 0a:00:27:00:00:02
inet 192.168.99.1 netmask 0xffffff00 broadcast 192.168.99.255
type: Ethernet
state availability: 0 (true)
qosmarking enabled: yes mode: none
Thanks for any help.