-/* $OpenBSD: if.c,v 1.392 2015/10/22 16:44:54 mpi Exp $ */
+/* $OpenBSD: if.c,v 1.393 2015/10/22 17:48:34 mpi Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
return (ifa_maybe);
}
-/*
- * Default action when installing a route with a Link Level gateway.
- * Lookup an appropriate real ifa to point to.
- * This should be moved to /sys/net/link.c eventually.
- */
-void
-link_rtrequest(int cmd, struct rtentry *rt)
-{
- struct ifaddr *ifa;
- struct sockaddr *dst;
- struct ifnet *ifp;
-
- if (cmd != RTM_ADD || ((ifa = rt->rt_ifa) == 0) ||
- ((ifp = ifa->ifa_ifp) == 0) || ((dst = rt_key(rt)) == 0))
- return;
- if ((ifa = ifaof_ifpforaddr(dst, ifp)) != NULL) {
- ifa->ifa_refcnt++;
- ifafree(rt->rt_ifa);
- rt->rt_ifa = ifa;
- if (ifa->ifa_rtrequest && ifa->ifa_rtrequest != link_rtrequest)
- ifa->ifa_rtrequest(cmd, rt);
- }
-}
-
/*
* Default action when installing a local route on a point-to-point
* interface.
-/* $OpenBSD: if_enc.c,v 1.61 2015/10/22 15:37:47 bluhm Exp $ */
+/* $OpenBSD: if_enc.c,v 1.62 2015/10/22 17:48:34 mpi Exp $ */
/*
* Copyright (c) 2010 Reyk Floeter <reyk@vantronix.net>
*/
if_alloc_sadl(ifp);
sc->sc_ifa.ifa_ifp = ifp;
- sc->sc_ifa.ifa_rtrequest = link_rtrequest;
sc->sc_ifa.ifa_addr = sdltosa(ifp->if_sadl);
sc->sc_ifa.ifa_netmask = NULL;
-/* $OpenBSD: if_mpe.c,v 1.48 2015/10/22 15:37:47 bluhm Exp $ */
+/* $OpenBSD: if_mpe.c,v 1.49 2015/10/22 17:48:34 mpi Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org>
#endif
mpeif->sc_ifa.ifa_ifp = ifp;
- mpeif->sc_ifa.ifa_rtrequest = link_rtrequest;
mpeif->sc_ifa.ifa_addr = sdltosa(ifp->if_sadl);
mpeif->sc_smpls.smpls_len = sizeof(mpeif->sc_smpls);
mpeif->sc_smpls.smpls_family = AF_MPLS;
-/* $OpenBSD: if_mpw.c,v 1.7 2015/10/22 15:37:47 bluhm Exp $ */
+/* $OpenBSD: if_mpw.c,v 1.8 2015/10/22 17:48:34 mpi Exp $ */
/*
* Copyright (c) 2015 Rafael Zalamena <rzalamena@openbsd.org>
if_alloc_sadl(ifp);
sc->sc_ifa.ifa_ifp = ifp;
- sc->sc_ifa.ifa_rtrequest = link_rtrequest;
sc->sc_ifa.ifa_addr = sdltosa(ifp->if_sadl);
sc->sc_smpls.smpls_len = sizeof(sc->sc_smpls);
sc->sc_smpls.smpls_family = AF_MPLS;
-/* $OpenBSD: if_var.h,v 1.48 2015/10/12 13:17:58 dlg Exp $ */
+/* $OpenBSD: if_var.h,v 1.49 2015/10/22 17:48:34 mpi Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
struct ifaddr *ifa_ifwithnet(struct sockaddr *, u_int);
struct ifaddr *ifaof_ifpforaddr(struct sockaddr *, struct ifnet *);
void ifafree(struct ifaddr *);
-void link_rtrequest(int, struct rtentry *);
void p2p_rtrequest(int, struct rtentry *);
void if_clone_attach(struct if_clone *);