summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2011-07-04 23:58:27 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2011-07-04 23:58:27 +0000
commitd821c6c6dd91c28532c667dd3346421ee697b6de (patch)
treedb8a3e74dc6a271c41cc5e36c840d6eab3bd89ed /sys/net
parentb73463c1bac8aa9b9b32192e2118088df3ae367f (diff)
Say no to hand-rolled m_adj(). It also kills three XXX.
OK dlg@ henning@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ethersubr.c6
1 files changed, 2 insertions, 4 deletions
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;