From 769660417884c6338bb835e2f73dc353f9a35c90 Mon Sep 17 00:00:00 2001 From: dlg Date: Fri, 18 Feb 2022 00:46:42 +0000 Subject: [PATCH] only unwind multicast when in learning mode. found by bluhm@ when he ran the regress tests. --- sys/net/if_vxlan.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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: -- 2.20.1