Improve handling when neither INET nor INET6 is defined.
@@ -106,9 +106,9 @@ sctp_userspace_get_mtu_from_ifn(uint32_t if_index)
if (if_index == 0xffffffff) {
mtu = 1280;
-#if defined(INET) || defined(INET6)
} else {
mtu = 0;
+#if defined(INET) || defined(INET6)
memset(&ifr, 0, sizeof(struct ifreq));
if (if_indextoname(if_index, ifr.ifr_name) != NULL) {
/* TODO can I use the raw socket here and not have to open a new one with each query? */
@@ -162,9 +162,9 @@ sctp_userspace_get_mtu_from_ifn(uint32_t if_index)
if (if_index == 0xffffffff) {
mtu = 1280;
-#if defined(INET) || defined(INET6)
} else {
mtu = 0;
+#if defined(INET) || defined(INET6)
AdapterAddrsSize = 0;
pAdapterAddrs = NULL;
if ((Err = GetAdaptersAddresses(AF_UNSPEC, 0, NULL, NULL, &AdapterAddrsSize)) != 0) {
