From: dlg Date: Fri, 18 Feb 2022 00:46:42 +0000 (+0000) Subject: only unwind multicast when in learning mode. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=769660417884c6338bb835e2f73dc353f9a35c90;p=openbsd only unwind multicast when in learning mode. found by bluhm@ when he ran the regress tests. --- diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index 3631a59d166..f43fa7ca89b 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vxlan.c,v 1.85 2022/02/16 01:45:31 dlg Exp $ */ +/* $OpenBSD: if_vxlan.c,v 1.86 2022/02/18 00:46:42 dlg Exp $ */ /* * Copyright (c) 2021 David Gwynne @@ -1160,9 +1160,11 @@ vxlan_up(struct vxlan_softc *sc) return (0); del: - if (ifp0 != NULL) - if_detachhook_del(ifp0, &sc->sc_dtask); - vxlan_delmulti(sc); + if (sc->sc_mode == VXLAN_TMODE_LEARNING) { + if (ifp0 != NULL) + if_detachhook_del(ifp0, &sc->sc_dtask); + vxlan_delmulti(sc); + } put: if_put(ifp0); down: