diff options
author | Kenjiro Cho <kjc@cvs.openbsd.org> | 2002-05-17 07:21:54 +0000 |
---|---|---|
committer | Kenjiro Cho <kjc@cvs.openbsd.org> | 2002-05-17 07:21:54 +0000 |
commit | 1bb268efb22606ee10f2bdb98d1dc1207b7d325c (patch) | |
tree | fdc6ebc3a6c95a66dfbc7cdd107306750f22f74f /sys/net | |
parent | 483ceccac7d0851361ab279215972e0c29cb6223 (diff) |
sync with KAME.
- make altq_etherclassify() able to handle packets whose ethernet header
is in a separate mbuf.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_ethersubr.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index ffffc70d106..c62680a97f5 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.62 2002/05/07 19:28:58 nate Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.63 2002/05/17 07:21:53 kjc Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -645,12 +645,15 @@ altq_etherclassify(struct ifaltq *ifq, struct mbuf *m, break; } + while (m->m_len <= hlen) { + hlen -= m->m_len; + m = m->m_next; + } if (m->m_len < (hlen + hdrsize)) { /* - * Ethernet and protocol header not in a single - * mbuf. We can't cope with this situation right - * now (but it shouldn't ever happen, really, anyhow). - * XXX Should use m_pulldown(). + * protocol header not in a single mbuf. + * We can't cope with this situation right now + * (but it shouldn't ever happen, really, anyhow). */ #ifdef DEBUG printf("altq_etherclassify: headers span multiple mbufs: " |