From cc83a8213b49f0981a9ffb1108e5bfe89873d4ef Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sat, 19 Dec 2009 03:26:28 +0000 Subject: [PATCH] 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. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34699 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/libs/compat/freebsd_network/if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/compat/freebsd_network/if.c b/src/libs/compat/freebsd_network/if.c index 54cd240620..1345f3b762 100644 --- a/src/libs/compat/freebsd_network/if.c +++ b/src/libs/compat/freebsd_network/if.c @@ -442,7 +442,7 @@ if_addmulti(struct ifnet *ifp, struct sockaddr *address, 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_delmulti(struct ifnet *ifp, struct sockaddr *address) } IF_ADDR_UNLOCK(ifp); - if (deleted) + if (deleted && ifp->if_ioctl != NULL) ifp->if_ioctl(ifp, SIOCDELMULTI, NULL); return 0;