Don't turn promisc off in vioif_deferred_init if already configured as promisc

This commit is contained in:
ozaki-r 2014-10-08 01:45:14 +00:00
parent ba5f5ce70d
commit f0449171ba

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_vioif.c,v 1.8 2014/08/13 14:35:46 pooka Exp $ */
/* $NetBSD: if_vioif.c,v 1.9 2014/10/08 01:45:14 ozaki-r Exp $ */
/*
* Copyright (c) 2010 Minoura Makoto.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.8 2014/08/13 14:35:46 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.9 2014/10/08 01:45:14 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -650,12 +650,13 @@ vioif_deferred_init(device_t self)
struct ifnet *ifp = &sc->sc_ethercom.ec_if;
int r;
if (ifp->if_flags & IFF_PROMISC)
return
r = vioif_set_promisc(sc, false);
if (r != 0)
aprint_error_dev(self, "resetting promisc mode failed, "
"errror code %d\n", r);
else
ifp->if_flags &= ~IFF_PROMISC;
}
/*