]> git.meshlink.io Git - catta/blobdiff - avahi-core/iface-pfroute.c
remove the NotFound event, as it is not used anymore
[catta] / avahi-core / iface-pfroute.c
index f2401e9475c34fcdc4da6d36597de4ca421a83c4..a7ecdc95c57e010f12c7640a4153176b92724aa5 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <sys/param.h>
 #include <sys/sysctl.h>
 
 #include <net/route.h>
@@ -87,8 +88,8 @@ static void rtm_info(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m)
   hw->mtu = ifm->ifm_data.ifi_mtu;
   
   hw->mac_address_size = sdl->sdl_alen;
-  if (hw->mac_address_size > AVAHI_MAX_MAC_ADDRESS)
-    hw->mac_address_size = AVAHI_MAX_MAC_ADDRESS;
+  if (hw->mac_address_size > AVAHI_MAC_ADDRESS_MAX)
+    hw->mac_address_size = AVAHI_MAC_ADDRESS_MAX;
   
   memcpy(hw->mac_address, sdl->sdl_data + sdl->sdl_nlen, hw->mac_address_size);
   
@@ -118,6 +119,11 @@ static void rtm_addr(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m)
   int prefixlen = 0;
   struct sockaddr *sa  =NULL;
 
+#ifdef __NetBSD__  
+  if(((struct sockaddr *)cp)->sa_family == AF_UNSPEC)
+    ((struct sockaddr *)cp)->sa_family = AF_INET;
+#endif
+
   if(((struct sockaddr *)cp)->sa_family != AF_INET && ((struct sockaddr *)cp)->sa_family != AF_INET6)
     return;