From e48dbd77f06afa6007a3e9630a0e94d9a4d0bf77 Mon Sep 17 00:00:00 2001 From: dlg Date: Wed, 3 Mar 2021 00:00:03 +0000 Subject: [PATCH] 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 --- sys/net/if_veb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) { -- 2.20.1