Refresh the NAT IP pointer after a potential mbuf reallocation. This

caused frequent lock-ups for individual sessions over a NAT'd ppp link
when MTU sizes ended up more or less exactly wrong.
This commit is contained in:
Brian Somers 2000-03-14 01:47:21 +00:00
parent 209dc10239
commit 574a3ffd78
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58043

View file

@ -380,6 +380,7 @@ nat_LayerPull(struct bundle *bundle, struct link *l, struct mbuf *bp,
/* Ensure there's a bit of extra buffer for the NAT code... */ /* Ensure there's a bit of extra buffer for the NAT code... */
bp = m_pullup(m_append(bp, NULL, NAT_EXTRABUF)); bp = m_pullup(m_append(bp, NULL, NAT_EXTRABUF));
ret = PacketAliasIn(MBUF_CTOP(bp), bp->m_len); ret = PacketAliasIn(MBUF_CTOP(bp), bp->m_len);
pip = (struct ip *)MBUF_CTOP(bp);
bp->m_len = ntohs(pip->ip_len); bp->m_len = ntohs(pip->ip_len);
if (bp->m_len > MAX_MRU) { if (bp->m_len > MAX_MRU) {