diff options
author | brian <brian@FreeBSD.org> | 2004-06-30 12:24:56 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2004-06-30 12:24:56 +0000 |
commit | 91f649862ba818f725de4dbbae946f759c67f63d (patch) | |
tree | 76236bba03020705b0cfc202918cca570310fc13 /usr.sbin/ppp/async.c | |
parent | 595d75cc49b8cc7aea7b0e1bef4be2938978bf98 (diff) | |
download | FreeBSD-src-91f649862ba818f725de4dbbae946f759c67f63d.zip FreeBSD-src-91f649862ba818f725de4dbbae946f759c67f63d.tar.gz |
Re-implement LQM, this time according to the rfc.
PR: 11293
MFC after: 4 weeks
Diffstat (limited to 'usr.sbin/ppp/async.c')
-rw-r--r-- | usr.sbin/ppp/async.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/ppp/async.c b/usr.sbin/ppp/async.c index 0fcf865..b938e68 100644 --- a/usr.sbin/ppp/async.c +++ b/usr.sbin/ppp/async.c @@ -106,6 +106,7 @@ async_LayerPush(struct bundle *bundle, struct link *l, struct mbuf *bp, struct physical *p = link2physical(l); u_char *cp, *sp, *ep; struct mbuf *wp; + size_t oldcnt; int cnt; if (!p || m_length(bp) > HDLCSIZE) { @@ -113,6 +114,8 @@ async_LayerPush(struct bundle *bundle, struct link *l, struct mbuf *bp, return NULL; } + oldcnt = m_length(bp); + cp = p->async.xbuff; ep = cp + HDLCSIZE - 10; wp = bp; @@ -134,6 +137,7 @@ async_LayerPush(struct bundle *bundle, struct link *l, struct mbuf *bp, m_freem(bp); bp = m_get(cnt, MB_ASYNCOUT); memcpy(MBUF_CTOP(bp), p->async.xbuff, cnt); + bp->priv = cnt - oldcnt; log_DumpBp(LogASYNC, "Write", bp); return bp; |