Tests: use iface en0 on macOS

IPv6 multicast doesn't work when IPV6_MULTICAST_IF set to 0 (although it
should).
This commit is contained in:
Martin Pulec
2019-11-18 15:25:22 +01:00
parent 0cf9b522ce
commit 5aed197216

View File

@@ -354,7 +354,11 @@ int test_net_udp(void)
printf
("Testing UDP/IP networking (IPv6 multicast) ............................... ");
fflush(stdout);
s1 = udp_init("ff01::2:7ffe", 5004, 5004, 1, 0, false);
const char *iface = NULL;
#ifdef HAVE_MACOSX
iface = "en0";
#endif
s1 = udp_init_if("ff01::2:7ffe", iface, 5004, 5004, 1, 0, false);
if (s1 == NULL) {
printf("FAIL\n");
printf(" Cannot initialize socket\n");