| @@ -911,27 +911,29 @@ mDNSlocal int SetupOneInterface(mDNS *co | | | @@ -911,27 +911,29 @@ mDNSlocal int SetupOneInterface(mDNS *co |
911 | } | | 911 | } |
912 | | | 912 | |
913 | // Call get_ifi_info() to obtain a list of active interfaces and call SetupOneInterface() on each one. | | 913 | // Call get_ifi_info() to obtain a list of active interfaces and call SetupOneInterface() on each one. |
914 | mDNSlocal int SetupInterfaceList(mDNS *const m) | | 914 | mDNSlocal int SetupInterfaceList(mDNS *const m) |
915 | { | | 915 | { |
916 | mDNSBool foundav4 = mDNSfalse; | | 916 | mDNSBool foundav4 = mDNSfalse; |
917 | int err = 0; | | 917 | int err = 0; |
918 | struct ifi_info *intfList = get_ifi_info(AF_INET, mDNStrue); | | 918 | struct ifi_info *intfList = get_ifi_info(AF_INET, mDNStrue); |
919 | struct ifi_info *firstLoopback = NULL; | | 919 | struct ifi_info *firstLoopback = NULL; |
920 | | | 920 | |
921 | assert(m != NULL); | | 921 | assert(m != NULL); |
922 | debugf("SetupInterfaceList"); | | 922 | debugf("SetupInterfaceList"); |
923 | | | 923 | |
924 | if (intfList == NULL) err = ENOENT; | | 924 | /* More interfaces, or usableable addresses to existing interfaces |
| | | 925 | * could be added later. */ |
| | | 926 | if (intfList == NULL) return 0; |
925 | | | 927 | |
926 | #if HAVE_IPV6 | | 928 | #if HAVE_IPV6 |
927 | if (err == 0) /* Link the IPv6 list to the end of the IPv4 list */ | | 929 | if (err == 0) /* Link the IPv6 list to the end of the IPv4 list */ |
928 | { | | 930 | { |
929 | struct ifi_info **p = &intfList; | | 931 | struct ifi_info **p = &intfList; |
930 | while (*p) p = &(*p)->ifi_next; | | 932 | while (*p) p = &(*p)->ifi_next; |
931 | *p = get_ifi_info(AF_INET6, mDNStrue); | | 933 | *p = get_ifi_info(AF_INET6, mDNStrue); |
932 | } | | 934 | } |
933 | #endif | | 935 | #endif |
934 | | | 936 | |
935 | if (err == 0) | | 937 | if (err == 0) |
936 | { | | 938 | { |
937 | struct ifi_info *i = intfList; | | 939 | struct ifi_info *i = intfList; |