summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-11-14 10:16:40 +0000
committerjulian <julian@FreeBSD.org>1999-11-14 10:16:40 +0000
commit48b105eb972b5d45634470499364f7b246574684 (patch)
treed863f1a72a24797f37bde54c8785470e2ed5583c /sys/net
parentac8208f082e0cc5f0eb897922605acba721196f7 (diff)
downloadFreeBSD-src-48b105eb972b5d45634470499364f7b246574684.zip
FreeBSD-src-48b105eb972b5d45634470499364f7b246574684.tar.gz
Fix screwup on synthesising incoming ethernet header in Netgraph mode.
Submitted by: brian@freebsd.org
Diffstat (limited to 'sys/net')
-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 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 {
OpenPOWER on IntegriCloud