-/* $OpenBSD: if_mpe.c,v 1.99 2021/03/18 14:47:17 kn Exp $ */
+/* $OpenBSD: if_mpe.c,v 1.100 2021/03/26 19:00:21 kn Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org>
sc->sc_smpls.smpls_label = label;
sc->sc_rdomain = rdomain;
+ /* only install with a label or mpe_clone_destroy() will ignore it */
+ if (sc->sc_smpls.smpls_label == MPLS_LABEL2SHIM(0))
+ return 0;
+
error = rt_ifa_add(&sc->sc_ifa, RTF_MPLS|RTF_LOCAL,
smplstosa(&sc->sc_smpls), sc->sc_rdomain);
if (error)
-/* $OpenBSD: if_mpip.c,v 1.14 2021/03/17 14:30:09 kn Exp $ */
+/* $OpenBSD: if_mpip.c,v 1.15 2021/03/26 19:00:21 kn Exp $ */
/*
* Copyright (c) 2015 Rafael Zalamena <rzalamena@openbsd.org>
sc->sc_smpls.smpls_label = shim;
sc->sc_rdomain = rdomain;
+ /* only install with a label or mpip_clone_destroy() will ignore it */
+ if (sc->sc_smpls.smpls_label == MPLS_LABEL2SHIM(0))
+ return 0;
+
error = rt_ifa_add(&sc->sc_ifa, RTF_MPLS | RTF_LOCAL,
smplstosa(&sc->sc_smpls), sc->sc_rdomain);
if (error) {
-/* $OpenBSD: if_mpw.c,v 1.61 2021/03/17 18:53:25 kn Exp $ */
+/* $OpenBSD: if_mpw.c,v 1.62 2021/03/26 19:00:21 kn Exp $ */
/*
* Copyright (c) 2015 Rafael Zalamena <rzalamena@openbsd.org>
sc->sc_smpls.smpls_label = label;
sc->sc_rdomain = rdomain;
+ /* only install with a label or mpw_clone_destroy() will ignore it */
+ if (sc->sc_smpls.smpls_label == MPLS_LABEL2SHIM(0))
+ return 0;
+
error = rt_ifa_add(&sc->sc_ifa, RTF_MPLS|RTF_LOCAL,
smplstosa(&sc->sc_smpls), sc->sc_rdomain);
if (error != 0)