summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-11-11 10:23:24 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-11-11 10:23:24 +0000
commitf810b5a7c857b4f3e39ad610ee4824edc7984846 (patch)
tree33a47201dacddb08e0b167616bf85ee607f36482 /sys/netinet
parent4eb5b488d2f448bf009b5b4aa8c700ae567efb5a (diff)
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')
-rw-r--r--sys/netinet/ip_output.c4
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)