diff options
author | 2015-11-11 10:23:23 +0000 | |
---|---|---|
committer | 2015-11-11 10:23:23 +0000 | |
commit | 5e9a6f6c0847c3c556b6904c110e113d5a7fd7c9 (patch) | |
tree | 0f37a8e0259508318032cc5c4aa2d2b2a4606d9c /sys/netinet/ip_output.c | |
parent | Kill useless IFQ_POLL(). (diff) | |
download | wireguard-openbsd-5e9a6f6c0847c3c556b6904c110e113d5a7fd7c9.tar.xz wireguard-openbsd-5e9a6f6c0847c3c556b6904c110e113d5a7fd7c9.zip |
Store the index of the lo0 interface instead of a pointer to its
descriptor.
Allow to get rid of two if_ref() in the output paths.
ok dlg@
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r-- | sys/netinet/ip_output.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 7f50c60f638..6833a0c3133 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.305 2015/11/03 21:11:48 naddy Exp $ */ +/* $OpenBSD: ip_output.c,v 1.306 2015/11/11 10:23:23 mpi Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -202,7 +202,7 @@ reroute: ia = ifatoia(ro->ro_rt->rt_ifa); if (ISSET(ro->ro_rt->rt_flags, RTF_LOCAL)) - ifp = if_ref(lo0ifp); + ifp = if_get(lo0ifidx); else ifp = if_get(ro->ro_rt->rt_ifidx); if ((mtu = ro->ro_rt->rt_rmx.rmx_mtu) == 0) |