From d821c6c6dd91c28532c667dd3346421ee697b6de Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Mon, 4 Jul 2011 23:58:27 +0000 Subject: Say no to hand-rolled m_adj(). It also kills three XXX. OK dlg@ henning@ --- sys/net/if_ethersubr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sys/net') diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 9aad1ce5703..d5b77eb20aa 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.148 2011/01/28 13:19:44 reyk Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.149 2011/07/04 23:58:26 claudio Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -822,9 +822,7 @@ decapsulate: /* SNAP */ if (m->m_pkthdr.len > etype) m_adj(m, etype - m->m_pkthdr.len); - m->m_data += 6; /* XXX */ - m->m_len -= 6; /* XXX */ - m->m_pkthdr.len -= 6; /* XXX */ + m_adj(m, 6); M_PREPEND(m, sizeof(*eh), M_DONTWAIT); if (m == 0) goto done; -- cgit v1.2.3