aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>1999-11-14 10:16:40 +0000
committerJulian Elischer <julian@FreeBSD.org>1999-11-14 10:16:40 +0000
commit2b75f795796464417e3e388cecc4d9d3beea29fe (patch)
treed863f1a72a24797f37bde54c8785470e2ed5583c
parentf91f0e2951d5783044f225d4443c2e10c737a387 (diff)
Notes
-rw-r--r--sys/net/if_ethersubr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index e3c110e4b586..f648fd544e7e 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1183,7 +1183,6 @@ ngether_send(struct arpcom *ac, struct ether_header *eh, struct mbuf *m)
m->m_len += sizeof(*eh);
m->m_data -= sizeof(*eh);
m->m_pkthdr.len += sizeof(*eh);
- bcopy ((caddr_t)eh, (caddr_t)eh2, sizeof(*eh));
} else {
/*
* Doing anything more is likely to get more
@@ -1194,10 +1193,12 @@ ngether_send(struct arpcom *ac, struct ether_header *eh, struct mbuf *m)
* hopefully everything after that will not
* need one. So let's just use m_prepend.
*/
- m = m_prepend(m, MHLEN, M_DONTWAIT);
+ m = m_prepend(m, sizeof(*eh), M_DONTWAIT);
if (m == NULL)
return;
}
+ bcopy ((caddr_t)eh, mtod(m, struct ether_header *),
+ sizeof(*eh));
}
ng_queue_data(LIST_FIRST(&(node->hooks)), m, NULL);
} else {