summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-10-22 17:48:35 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-10-22 17:48:35 +0000
commit739de27d93b04590df01255c8258c80d4efbf438 (patch)
treef67e56b9f4da58302736ba41b4ad7584a3aa5f8d /sys
parentfc19a686339eb476057c8b3b989db339efea3f4c (diff)
Kill link_rtrequest(), introduce in 1990 to "fix" the result
of rt_getifa() when adding link level route from outside the kernel. ok claudio@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if.c26
-rw-r--r--sys/net/if_enc.c3
-rw-r--r--sys/net/if_mpe.c3
-rw-r--r--sys/net/if_mpw.c3
-rw-r--r--sys/net/if_var.h3
5 files changed, 5 insertions, 33 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 332303834b2..91e41f762d8 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $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 $ */
/*
@@ -1274,30 +1274,6 @@ ifaof_ifpforaddr(struct sockaddr *addr, struct ifnet *ifp)
}
/*
- * 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.
*/
diff --git a/sys/net/if_enc.c b/sys/net/if_enc.c
index 4c1e308fb28..ca3ecbb75ae 100644
--- a/sys/net/if_enc.c
+++ b/sys/net/if_enc.c
@@ -1,4 +1,4 @@
-/* $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>
@@ -104,7 +104,6 @@ enc_clone_create(struct if_clone *ifc, int unit)
*/
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;
diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c
index 53da65c4373..a88d6e1b748 100644
--- a/sys/net/if_mpe.c
+++ b/sys/net/if_mpe.c
@@ -1,4 +1,4 @@
-/* $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>
@@ -105,7 +105,6 @@ mpe_clone_create(struct if_clone *ifc, int unit)
#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;
diff --git a/sys/net/if_mpw.c b/sys/net/if_mpw.c
index 197bb54f9f0..84c94fe6b72 100644
--- a/sys/net/if_mpw.c
+++ b/sys/net/if_mpw.c
@@ -1,4 +1,4 @@
-/* $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>
@@ -105,7 +105,6 @@ mpw_clone_create(struct if_clone *ifc, int unit)
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;
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index a58be229d48..b2e542f85dd 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -1,4 +1,4 @@
-/* $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 $ */
/*
@@ -422,7 +422,6 @@ struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *, u_int);
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 *);