In ip_forward(), when calculating the MTU in effect for an IPSEC transport

mode tunnel, take the per-route MTU into account, *if* and *only if* it
is non-zero (as found in struct rt_metrics/rt_metrics_lite).

PR:		kern/42727
Obtained from:	NetBSD (ip_input.c rev 1.151)
This commit is contained in:
Bruce M Simpson 2004-06-16 08:33:09 +00:00
parent e6b0a57025
commit 57ab3660ff
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130581

View file

@ -1957,6 +1957,8 @@ ip_forward(struct mbuf *m, int srcrt, struct sockaddr_in *next_hop)
ro = &sp->req->sav->sah->sa_route;
if (ro->ro_rt && ro->ro_rt->rt_ifp) {
dummyifp.if_mtu =
ro->ro_rt->rt_rmx.rmx_mtu ?
ro->ro_rt->rt_rmx.rmx_mtu :
ro->ro_rt->rt_ifp->if_mtu;
dummyifp.if_mtu -= ipsechdr;
destifp = &dummyifp;