From: dlg Date: Wed, 3 Mar 2021 00:00:03 +0000 (+0000) Subject: clean up span ports as span ports, not bridge ports. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e48dbd77f06afa6007a3e9630a0e94d9a4d0bf77;p=openbsd clean up span ports as span ports, not bridge ports. the visible result of this is that span ports aren't made promisc like bridge ports. when cleaning up a span port, trying to take promisc off it screwed up the refs, and it makes the underlying interface not able to be promisc when it should be promisc. found by dave voutila --- diff --git a/sys/net/if_veb.c b/sys/net/if_veb.c index 5425b3fa694..fd4cb4c3b73 100644 --- a/sys/net/if_veb.c +++ b/sys/net/if_veb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_veb.c,v 1.13 2021/03/02 23:40:06 dlg Exp $ */ +/* $OpenBSD: if_veb.c,v 1.14 2021/03/03 00:00:03 dlg Exp $ */ /* * Copyright (c) 2021 David Gwynne @@ -129,7 +129,6 @@ struct veb_port { struct ether_brport p_brport; unsigned int p_link_state; - unsigned int p_span; unsigned int p_bif_flags; uint32_t p_protected; @@ -1862,7 +1861,7 @@ veb_p_dtor(struct veb_softc *sc, struct veb_port *p, const char *op) if_detachhook_del(ifp0, &p->p_dtask); if_linkstatehook_del(ifp0, &p->p_ltask); - if (p->p_span) { + if (ISSET(p->p_bif_flags, IFBIF_SPAN)) { port_list = &sc->sc_spans; } else { if (ifpromisc(ifp0, 0) != 0) {