diff options
| author | Hartmut Brandt <harti@FreeBSD.org> | 2004-02-21 12:55:07 +0000 |
|---|---|---|
| committer | Hartmut Brandt <harti@FreeBSD.org> | 2004-02-21 12:55:07 +0000 |
| commit | 8f52a59171ecbae4ad77acd869011df4a56bcdaa (patch) | |
| tree | 1adec56b8d416c89363ee45eb38b4270acc7b6a1 /sys | |
| parent | efb4018be70b5936b1ea4527cd7e4cc5eab1bfa1 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/netatm/atm_subr.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/netatm/atm_subr.c b/sys/netatm/atm_subr.c index a2768f3a243d..d816dfd63129 100644 --- a/sys/netatm/atm_subr.c +++ b/sys/netatm/atm_subr.c @@ -542,6 +542,8 @@ atm_stack_drain() * and a token (typically a driver/stack control block) at the front of the * queued buffer. We assume that the function pointer and token values are * both contained (and properly aligned) in the first buffer of the chain. + * The size of these two fields is not accounted for in the packet header + * length field. The packet header itself must be in the first mbuf. * * Arguments: * none @@ -562,16 +564,13 @@ atm_intr(struct mbuf *m) /* * Get function to call and token value */ - KB_DATASTART(m, cp, caddr_t); + cp = mtod(m, caddr_t); func = *(atm_intr_func_t *)cp; cp += sizeof(func); token = *(void **)cp; - KB_HEADADJ(m, -(sizeof(func) + sizeof(token))); - if (KB_LEN(m) == 0) { - KBuffer *m1; - KB_UNLINKHEAD(m, m1); - m = m1; - } + + m->m_len -= sizeof(func) + sizeof(token); + m->m_data += sizeof(func) + sizeof(token); /* * Call processing function |
