diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2017-01-03 15:35:35 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2017-01-03 15:35:35 +0000 |
commit | d9add5faee4f3f1221d7dcf3dac23dccfd8719ce (patch) | |
tree | 6bfa92d11057cd3a01892e3d644cd297745063f0 /sys/net | |
parent | d52a79c5f18ed9ea950af7b05a6dd021fea846c0 (diff) |
Don't try to reconfigure the multicast group in the detach handler of
the multicast interface - simply clear the VXLAN configuration when
the associated multicast interface disappears. This fixes some
locking and recursion problems.
OK mpi@ mikeb@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_vxlan.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index e9bc1cb8305..d863afd3849 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vxlan.c,v 1.54 2016/12/13 06:51:11 dlg Exp $ */ +/* $OpenBSD: if_vxlan.c,v 1.55 2017/01/03 15:35:34 reyk Exp $ */ /* * Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org> @@ -947,17 +947,16 @@ vxlan_if_change(void *arg) { struct vxlan_softc *sc = arg; struct ifnet *ifp = &sc->sc_ac.ac_if; - int s, error; + int s; /* * Reset the configuration after the parent interface disappeared. */ s = splnet(); - if ((error = vxlan_config(ifp, NULL, NULL)) != 0) { - /* The configured tunnel addresses are invalid, remove them */ - bzero(&sc->sc_src, sizeof(sc->sc_src)); - bzero(&sc->sc_dst, sizeof(sc->sc_dst)); - } + vxlan_multicast_cleanup(ifp); + memset(&sc->sc_src, 0, sizeof(sc->sc_src)); + memset(&sc->sc_dst, 0, sizeof(sc->sc_dst)); + sc->sc_dstport = htons(VXLAN_PORT); splx(s); } |