diff options
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 0fcf865264fb..b938e6845b8c 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; |
