diff options
author | 2000-03-04 02:21:58 +0000 | |
---|---|---|
committer | 2000-03-04 02:21:58 +0000 | |
commit | 06b6d5eabc2f954b8fe46345d35054561de3a498 (patch) | |
tree | fdb2b909f14670489a43e0a34442b5cb176b29cc | |
parent | handle corrupt inetd.conf files better; sdb@ssr.com (diff) | |
download | wireguard-openbsd-06b6d5eabc2f954b8fe46345d35054561de3a498.tar.xz wireguard-openbsd-06b6d5eabc2f954b8fe46345d35054561de3a498.zip |
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.
-rw-r--r-- | usr.sbin/ppp/ppp/nat_cmd.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <perhaps@yes.no>, * 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 <sys/param.h> @@ -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) { |