From 06b6d5eabc2f954b8fe46345d35054561de3a498 Mon Sep 17 00:00:00 2001 From: brian Date: Sat, 4 Mar 2000 02:21:58 +0000 Subject: [PATCH] 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. --- usr.sbin/ppp/ppp/nat_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/ppp/ppp/nat_cmd.c b/usr.sbin/ppp/ppp/nat_cmd.c index 44e66c39951..edb62ecc7b4 100644 --- a/usr.sbin/ppp/ppp/nat_cmd.c +++ b/usr.sbin/ppp/ppp/nat_cmd.c @@ -2,7 +2,7 @@ * The code in this file was written by Eivind Eklund , * who places it in the public domain without restriction. * - * $OpenBSD: nat_cmd.c,v 1.4 2000/03/03 21:52:57 brian Exp $ + * $OpenBSD: nat_cmd.c,v 1.5 2000/03/04 02:21:58 brian Exp $ */ #include @@ -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... */ bp = m_pullup(m_append(bp, NULL, NAT_EXTRABUF)); ret = PacketAliasIn(MBUF_CTOP(bp), bp->m_len); + pip = (struct ip *)MBUF_CTOP(bp); bp->m_len = ntohs(pip->ip_len); if (bp->m_len > MAX_MRU) { -- 2.20.1