diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-08-25 13:57:08 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-08-25 13:57:08 +0000 |
commit | a931256365e6b694f694c66b72d3e99f237425ed (patch) | |
tree | 86d72202bcc98ba3dae4715e739b856492d0b0ff /sys/net/if_mpe.c | |
parent | 331b4748570a2f58ba29b5a9f65aeaf57035dfd0 (diff) |
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
Diffstat (limited to 'sys/net/if_mpe.c')
-rw-r--r-- | sys/net/if_mpe.c | 13 |
1 files changed, 12 insertions, 1 deletions
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 <pyr@spootnik.org> @@ -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); } |