[haiku-commits] r34699 - haiku/trunk/src/libs/compat/freebsd_network

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 19 Dec 2009 04:26:28 +0100 (CET)

Author: mmlr
Date: 2009-12-19 04:26:28 +0100 (Sat, 19 Dec 2009)
New Revision: 34699
Changeset: http://dev.haiku-os.org/changeset/34699/haiku

Modified:
   haiku/trunk/src/libs/compat/freebsd_network/if.c
Log:
The wlan part uses a very specific way to update multicast addresses for the
parent interface. It calls if_addmulti() on it but temporarily sets the ioctl
hook to NULL. We need to account for that so we don't crash on multicast setup.


Modified: haiku/trunk/src/libs/compat/freebsd_network/if.c
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/if.c    2009-12-19 00:14:44 UTC 
(rev 34698)
+++ haiku/trunk/src/libs/compat/freebsd_network/if.c    2009-12-19 03:26:28 UTC 
(rev 34699)
@@ -442,7 +442,7 @@
        if (result == NULL)
                return ENOBUFS;
 
-       if (refcount == 1)
+       if (refcount == 1 && ifp->if_ioctl != NULL)
                ifp->if_ioctl(ifp, SIOCADDMULTI, NULL);
 
        if (out)
@@ -477,7 +477,7 @@
        }
        IF_ADDR_UNLOCK(ifp);
 
-       if (deleted)
+       if (deleted && ifp->if_ioctl != NULL)
                ifp->if_ioctl(ifp, SIOCDELMULTI, NULL);
 
        return 0;


Other related posts:

  • » [haiku-commits] r34699 - haiku/trunk/src/libs/compat/freebsd_network - mmlr