From a931256365e6b694f694c66b72d3e99f237425ed Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Wed, 25 Aug 2010 13:57:08 +0000 Subject: Move the iface specific ioctl call for SIOCSIFRDOMAIN further down so that all the magic cleanup happens before. This is needed because mpe(4) needs to add a route which would be removed by the cleanup code. OK henning --- sys/net/if_mpe.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'sys/net/if_mpe.c') diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c index 509bd795882..870360f2beb 100644 --- a/sys/net/if_mpe.c +++ b/sys/net/if_mpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpe.c,v 1.21 2010/07/02 02:40:16 blambert Exp $ */ +/* $OpenBSD: if_mpe.c,v 1.22 2010/08/25 13:57:07 claudio Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard @@ -343,6 +343,17 @@ mpeioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; ifm->sc_shim.shim_label = shim.shim_label; break; + case SIOCSIFRDOMAIN: + /* must readd the MPLS "route" for our label */ + ifm = ifp->if_softc; + if (ifr->ifr_rdomainid != ifp->if_rdomain) { + if (ifm->sc_shim.shim_label) { + shim.shim_label = ifm->sc_shim.shim_label; + error = mpe_newlabel(ifp, RTM_ADD, &shim); + } + } + /* return with ENOTTY so that the parent handler finishes */ + return (ENOTTY); default: return (ENOTTY); } -- cgit v1.2.3