Index: src/unix/ifnet.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/unix/ifnet.c,v
retrieving revision 1.9
retrieving revision 1.14
diff -u -r1.9 -r1.14
--- src/unix/ifnet.c	4 Dec 2004 17:06:57 -0000	1.9
+++ src/unix/ifnet.c	5 Jan 2005 15:35:16 -0000	1.14
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: ifnet.c,v 1.9 2004/12/04 17:06:57 tlopatic Exp $
+ * $Id: ifnet.c,v 1.14 2005/01/05 15:35:16 kattemat Exp $
  */
 
 
@@ -54,7 +54,7 @@
 #define SIOCGIWMODE	0x8B07		/* get operation mode */
 #define SIOCSIWSENS	0x8B08		/* set sensitivity (dBm) */
 #define SIOCGIWSENS	0x8B09		/* get sensitivity (dBm) */
-#elif defined __FreeBSD__ || defined __MacOSX__
+#elif defined __FreeBSD__ || defined __MacOSX__ || defined __NetBSD__
 #define ifr_netmask ifr_addr
 #endif
 
@@ -197,7 +197,9 @@
    */
 
   /* Check broadcast */
-  if ((olsr_cnf->ip_version == AF_INET) && (!(ifp->int_flags & IFF_BROADCAST))) 
+  if ((olsr_cnf->ip_version == AF_INET) && 
+      (iface->cnf->ipv4_broadcast.v4) && /* Skip if fixed bcast */ 
+      (!(ifp->int_flags & IFF_BROADCAST))) 
     {
       olsr_printf(3, "\tNo broadcast - removing\n");
       goto remove_interface;
@@ -562,7 +564,9 @@
     }
 
   /* Check broadcast */
-  if ((olsr_cnf->ip_version == AF_INET) && (!(ifs.int_flags & IFF_BROADCAST))) 
+  if ((olsr_cnf->ip_version == AF_INET) &&
+      (iface->cnf->ipv4_broadcast.v4) && /* Skip if fixed bcast */ 
+      (!(ifs.int_flags & IFF_BROADCAST))) 
     {
       olsr_printf(debuglvl, "\tNo broadcast - skipping\n");
       return 0;
@@ -606,7 +610,9 @@
       olsr_printf(debuglvl, "\tAddress: %s\n", ip6_to_string(&ifs.int6_addr.sin6_addr));
       
       /* Multicast */
-      ifs.int6_multaddr.sin6_addr = (iface->cnf->ipv6_addrtype == 1) ? iface->cnf->ipv6_multi_site.v6 :iface->cnf->ipv6_multi_site.v6;
+      ifs.int6_multaddr.sin6_addr = (iface->cnf->ipv6_addrtype == IPV6_ADDR_SITELOCAL) ? 
+	iface->cnf->ipv6_multi_site.v6 :
+	iface->cnf->ipv6_multi_glbl.v6;
       /* Set address family */
       ifs.int6_multaddr.sin6_family = AF_INET6;
       /* Set port */
@@ -690,7 +696,7 @@
   olsr_printf(1, "\tMTU: %d\n", ifs.int_mtu);
 
   olsr_syslog(OLSR_LOG_INFO, "Adding interface %s\n", iface->name);
-  olsr_printf(1, "\tIndex %d\n", iface->name, ifs.if_nr);
+  olsr_printf(1, "\tIndex %d\n", ifs.if_nr);
 
   if(olsr_cnf->ip_version == AF_INET)
     {
