Suppress the assertion of IFNET_LOCK in if_mcast_op if MROUTING

MROUTING doesn't deal with IFNET_LOCK yet.

Reported by kardel@
This commit is contained in:
ozaki-r 2017-12-26 02:01:35 +00:00
parent e5e34a6c86
commit c00d5e8f6f

View File

@ -1,4 +1,4 @@
/* $NetBSD: if.c,v 1.416 2017/12/15 04:04:58 ozaki-r Exp $ */
/* $NetBSD: if.c,v 1.417 2017/12/26 02:01:35 ozaki-r Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@ -90,16 +90,16 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.416 2017/12/15 04:04:58 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.417 2017/12/26 02:01:35 ozaki-r Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
#include "opt_ipsec.h"
#include "opt_atalk.h"
#include "opt_natm.h"
#include "opt_wlan.h"
#include "opt_net_mpsafe.h"
#include "opt_mrouting.h"
#endif
#include <sys/param.h>
@ -3597,8 +3597,8 @@ if_mcast_op(ifnet_t *ifp, const unsigned long cmd, const struct sockaddr *sa)
int rc;
struct ifreq ifr;
/* CARP still doesn't deal with the lock yet */
#if !defined(NCARP) || (NCARP == 0)
/* CARP and MROUTING still don't deal with the lock yet */
#if (!defined(NCARP) || (NCARP == 0)) && !defined(MROUTING)
KASSERT(IFNET_LOCKED(ifp));
#endif
if (ifp->if_mcastop != NULL)