diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-11-23 15:54:46 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-11-23 15:54:46 +0000 |
commit | 9bb1d48b0496c58b4f1bb9042dd10004f0ccad9c (patch) | |
tree | 76553ca7073dd7ebb934aef84d86ae07fdc2c13c /sys | |
parent | c2427d8a825bf4089e77906950e83cd81078da43 (diff) |
Use if_get() rather than rt_ifp.
ok sashan@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_input.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 62e3ff98cc7..39f8e592324 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.261 2015/11/14 15:40:40 mpi Exp $ */ +/* $OpenBSD: ip_input.c,v 1.262 2015/11/23 15:54:45 mpi Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -1516,8 +1516,14 @@ ip_forward(struct mbuf *m, struct ifnet *ifp, int srcrt) if (rt->rt_rmx.rmx_mtu) destmtu = rt->rt_rmx.rmx_mtu; - else - destmtu = ipforward_rt.ro_rt->rt_ifp->if_mtu; + else { + struct ifnet *destifp; + + destifp = if_get(rt->rt_ifidx); + if (destifp != NULL) + destmtu = destifp->if_mtu; + if_put(destifp); + } } #endif /*IPSEC*/ ipstat.ips_cantfrag++; |