summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-09-10 14:46:28 +0000
committermpi <mpi@openbsd.org>2015-09-10 14:46:28 +0000
commit10e2ba44f3e47a17b46e6a907d07f97e25335d3c (patch)
tree1172696b35e59456a78c109aefab968088ce1077
parentInitialize `pc' earlier so that the siginfo pc value is correct in case of (diff)
downloadwireguard-openbsd-10e2ba44f3e47a17b46e6a907d07f97e25335d3c.tar.xz
wireguard-openbsd-10e2ba44f3e47a17b46e6a907d07f97e25335d3c.zip
Stop supporting RTAX_IFP arguments with an interface name in the
sdl_data field, a la link_addr(3). route(8)-like applications wanting to specify an ifp must set sdl_index to the corresponding interface index. Not mixing if_get() and ifunit() makes our life easier. The idea is to have a minimum number of functions dealing w/ ifp refcount. Hopefully if_get() will be the only one. ok mikeb@, claudio@, dlg@
-rw-r--r--sys/net/route.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 5952ce74dc3..77d901118dd 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.231 2015/09/10 09:37:52 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.232 2015/09/10 14:46:28 mpi Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -682,8 +682,6 @@ ifa_ifwithroute(int flags, struct sockaddr *dst, struct sockaddr *gateway,
struct sockaddr_dl *sdl = (struct sockaddr_dl *)gateway;
struct ifnet *ifp = if_get(sdl->sdl_index);
- if (ifp == NULL)
- ifp = ifunit(sdl->sdl_data);
if (ifp != NULL)
ifa = ifaof_ifpforaddr(dst, ifp);
} else {
@@ -726,8 +724,6 @@ rt_getifa(struct rt_addrinfo *info, u_int rtid)
sdl = (struct sockaddr_dl *)info->rti_info[RTAX_IFP];
ifp = if_get(sdl->sdl_index);
- if (ifp == NULL)
- ifp = ifunit(sdl->sdl_data);
}
#ifdef IPSEC