diff options
author | brian <brian@FreeBSD.org> | 2000-07-12 15:08:03 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-07-12 15:08:03 +0000 |
commit | e19f8cf9419d58de5eb8ee488f29f8cab0932a16 (patch) | |
tree | 362395899628a8febde2fce43212b697279067c6 /usr.sbin/ppp/mp.c | |
parent | 35e157aa95b7979f9ef2aefe0c1ca25c94acf68f (diff) | |
download | FreeBSD-src-e19f8cf9419d58de5eb8ee488f29f8cab0932a16.zip FreeBSD-src-e19f8cf9419d58de5eb8ee488f29f8cab0932a16.tar.gz |
Fix a rather nasty latency problem that occurs with single tcp sessions
thorough an MP setup with only a single link.
Diffstat (limited to 'usr.sbin/ppp/mp.c')
-rw-r--r-- | usr.sbin/ppp/mp.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/usr.sbin/ppp/mp.c b/usr.sbin/ppp/mp.c index 579e1d2..109b66a 100644 --- a/usr.sbin/ppp/mp.c +++ b/usr.sbin/ppp/mp.c @@ -442,26 +442,32 @@ mp_Assemble(struct mp *mp, struct mbuf *m, struct physical *p) * the queue. */ - if (!mp->inbufs) { - mp->inbufs = m; - m = NULL; - } - last = NULL; seq = mp->seq.next_in; q = mp->inbufs; - while (q) { - mp_ReadHeader(mp, q, &h); - if (m && isbefore(mp->local_is12bit, mh.seq, h.seq)) { - /* Our received fragment fits in before this one, so link it in */ + while (q || m) { + if (!q) { if (last) last->m_nextpkt = m; else mp->inbufs = m; - m->m_nextpkt = q; q = m; - h = mh; m = NULL; + h = mh; + } else { + mp_ReadHeader(mp, q, &h); + + if (m && isbefore(mp->local_is12bit, mh.seq, h.seq)) { + /* Our received fragment fits in before this one, so link it in */ + if (last) + last->m_nextpkt = m; + else + mp->inbufs = m; + m->m_nextpkt = q; + q = m; + h = mh; + m = NULL; + } } if (h.seq != seq) { |