diff options
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r-- | sys/net/if_ethersubr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index e3c110e..f648fd5 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 { |