From: dlg Date: Tue, 28 Dec 2021 23:10:58 +0000 (+0000) Subject: it doesnt make sense to configure a vport as a span port. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=02cdd80984cd3e63edcc1dc96a86fa4794eb1891;p=openbsd it doesnt make sense to configure a vport as a span port. --- diff --git a/sys/net/if_veb.c b/sys/net/if_veb.c index 24df521ddd0..ad7c0a3eb6a 100644 --- a/sys/net/if_veb.c +++ b/sys/net/if_veb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_veb.c,v 1.22 2021/12/28 23:10:30 dlg Exp $ */ +/* $OpenBSD: if_veb.c,v 1.23 2021/12/28 23:10:58 dlg Exp $ */ /* * Copyright (c) 2021 David Gwynne @@ -1297,6 +1297,11 @@ veb_add_port(struct veb_softc *sc, const struct ifbreq *req, unsigned int span) if (span) { port_list = &sc->sc_spans; + if (isvport) { + error = EPROTONOSUPPORT; + goto free; + } + p->p_brport.eb_input = veb_span_input; p->p_bif_flags = IFBIF_SPAN; } else {