From 824e7fc7b0d766f088662635e406237672985682 Mon Sep 17 00:00:00 2001 From: mpi Date: Sat, 24 Oct 2015 12:33:16 +0000 Subject: [PATCH] Convert some if_ref() to if_get(). ok claudio@ --- sys/netinet/ip_output.c | 4 ++-- sys/netinet6/in6_src.c | 4 ++-- sys/netinet6/ip6_output.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 5e9147a1014..3130e91fd77 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.303 2015/10/20 20:22:42 benno Exp $ */ +/* $OpenBSD: ip_output.c,v 1.304 2015/10/24 12:33:16 mpi Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -204,7 +204,7 @@ reroute: if (ISSET(ro->ro_rt->rt_flags, RTF_LOCAL)) ifp = if_ref(lo0ifp); else - ifp = if_ref(ro->ro_rt->rt_ifp); + ifp = if_get(ro->ro_rt->rt_ifidx); if ((mtu = ro->ro_rt->rt_rmx.rmx_mtu) == 0) mtu = ifp->if_mtu; diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index e4cb8674194..dfe5791948f 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_src.c,v 1.65 2015/10/22 16:33:32 mpi Exp $ */ +/* $OpenBSD: in6_src.c,v 1.66 2015/10/24 12:33:16 mpi Exp $ */ /* $KAME: in6_src.c,v 1.36 2001/02/06 04:08:17 itojun Exp $ */ /* @@ -457,7 +457,7 @@ in6_selectif(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, return (rt->rt_flags & RTF_HOST ? EHOSTUNREACH : ENETUNREACH); if (rt != NULL) - *retifp = if_ref(rt->rt_ifp); + *retifp = if_get(rt->rt_ifidx); return (0); } diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index a3cae036bc1..e130d7f6a0b 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_output.c,v 1.190 2015/10/19 12:11:28 mpi Exp $ */ +/* $OpenBSD: ip6_output.c,v 1.191 2015/10/24 12:33:16 mpi Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -553,7 +553,7 @@ reroute: if (ISSET(rt->rt_flags, RTF_LOCAL)) ifp = if_ref(lo0ifp); else - ifp = if_ref(rt->rt_ifp); + ifp = if_get(rt->rt_ifidx); } else { *dst = dstsock; } @@ -2382,7 +2382,7 @@ ip6_setmoptions(int optname, struct ip6_moptions **im6op, struct mbuf *m) error = EADDRNOTAVAIL; break; } - ifp = if_ref(ro.ro_rt->rt_ifp); + ifp = if_get(ro.ro_rt->rt_ifidx); rtfree(ro.ro_rt); } else { /* -- 2.20.1