diff options
author | 2019-02-13 23:47:42 +0000 | |
---|---|---|
committer | 2019-02-13 23:47:42 +0000 | |
commit | 8f960e22352b7ad1b6bb02e6c7de9ee6f54a819f (patch) | |
tree | 26ea4e08934508eae0c95ed5a403b7d7fbe5b4f1 /sys/net/if_mpe.c | |
parent | (unsigned) means (unsigned int) which on ptrdiff_t or size_t or other (diff) | |
download | wireguard-openbsd-8f960e22352b7ad1b6bb02e6c7de9ee6f54a819f.tar.xz wireguard-openbsd-8f960e22352b7ad1b6bb02e6c7de9ee6f54a819f.zip |
change rt_ifa_add and rt_ifa_del so they take an rdomain argument.
this allows mpls interfaces (mpe, mpw) to pass the rdomain they
wish the local label to be in, rather than have it implicitly forced
to 0 by these functions. right now they'll pass 0, but it will soon
be possible to have them rx packets in other rdomains.
previously the functions used ifp->if_rdomain for the rdomain.
everything other than mpls still passes ifp->if_rdomain.
ok mpi@
Diffstat (limited to 'sys/net/if_mpe.c')
-rw-r--r-- | sys/net/if_mpe.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c index a3862e67be3..c6a260ad9ed 100644 --- a/sys/net/if_mpe.c +++ b/sys/net/if_mpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpe.c,v 1.80 2019/02/11 00:11:24 dlg Exp $ */ +/* $OpenBSD: if_mpe.c,v 1.81 2019/02/13 23:47:42 dlg Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -130,7 +130,7 @@ mpe_clone_destroy(struct ifnet *ifp) if (sc->sc_smpls.smpls_label) { rt_ifa_del(&sc->sc_ifa, RTF_MPLS, - smplstosa(&sc->sc_smpls)); + smplstosa(&sc->sc_smpls), 0); } if_detach(ifp); @@ -316,12 +316,12 @@ mpe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (sc->sc_smpls.smpls_label) { /* remove old MPLS route */ rt_ifa_del(&sc->sc_ifa, RTF_MPLS, - smplstosa(&sc->sc_smpls)); + smplstosa(&sc->sc_smpls), 0); } /* add new MPLS route */ sc->sc_smpls.smpls_label = shim.shim_label; error = rt_ifa_add(&sc->sc_ifa, RTF_MPLS|RTF_LOCAL, - smplstosa(&sc->sc_smpls)); + smplstosa(&sc->sc_smpls), 0); if (error) { sc->sc_smpls.smpls_label = 0; break; @@ -333,7 +333,7 @@ mpe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (ifr->ifr_rdomainid != ifp->if_rdomain) { if (sc->sc_smpls.smpls_label) { rt_ifa_add(&sc->sc_ifa, RTF_MPLS, - smplstosa(&sc->sc_smpls)); + smplstosa(&sc->sc_smpls), 0); } } /* return with ENOTTY so that the parent handler finishes */ |