don't update outgoing ifp, if ipsec tunnel mode encapsulation

was not made.

Obtained from:	KAME
This commit is contained in:
ume 2004-02-16 17:05:06 +00:00
parent e0e9092c44
commit a9d87abe7e

View File

@ -569,7 +569,6 @@ sendit:
}
goto bad;
}
}
/* be sure to update variables that are affected by ipsec4_output() */
ip = mtod(m, struct ip *);
@ -582,9 +581,12 @@ sendit:
goto bad;
}
} else {
ia = ifatoia(ro->ro_rt->rt_ifa);
ifp = ro->ro_rt->rt_ifp;
if (state.encap) {
ia = ifatoia(ro->ro_rt->rt_ifa);
ifp = ro->ro_rt->rt_ifp;
}
}
}
/* make it flipped, again. */
ip->ip_len = ntohs(ip->ip_len);