X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;ds=sidebyside;f=avahi-core%2Fiface-pfroute.c;h=6d7de60c9869785d86b256c38af798d6bc2bd5e2;hb=2afb248985218ecb5c3b105ff04a986a506b59f9;hp=c573075847e33a3c542f322c4a888bff44c37d20;hpb=eee711106f721fc73a1ef50348984b7a1d9cb595;p=catta diff --git a/avahi-core/iface-pfroute.c b/avahi-core/iface-pfroute.c index c573075..6d7de60 100644 --- a/avahi-core/iface-pfroute.c +++ b/avahi-core/iface-pfroute.c @@ -321,11 +321,20 @@ void avahi_interface_monitor_sync(AvahiInterfaceMonitor *m) { mib[4] = NET_RT_IFLIST; mib[5] = 0; /* no flags */ if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) - return; + { + avahi_log_error("sysctl failed: %s", strerror(errno)); + avahi_log_error("route-sysctl-estimate"); + return; + } if ((buf = avahi_malloc(needed)) == NULL) - return; + { + avahi_log_error("malloc failed in avahi_interface_monitor_sync"); + return; + } if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) { + avahi_log_warn("sysctl failed: %s", strerror(errno)); if (errno == ENOMEM && count++ < 10) { + avahi_log_warn("Routing table grew, retrying"); sleep(1); avahi_free(buf); goto retry2;