summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authormelifaro <melifaro@FreeBSD.org>2016-01-01 10:15:06 +0000
committermelifaro <melifaro@FreeBSD.org>2016-01-01 10:15:06 +0000
commit9a86ecf0aeb7e35f973c268adae4d400c7cf404c (patch)
treee941cb9051c9f33e90efa0e9291be9dc06567856 /sys/net
parent11d782769ff19b67410281362ae83a056498d6fd (diff)
downloadFreeBSD-src-9a86ecf0aeb7e35f973c268adae4d400c7cf404c.zip
FreeBSD-src-9a86ecf0aeb7e35f973c268adae4d400c7cf404c.tar.gz
Remove second EVENTHANDLER_REGISTER slipped in r292978.
Describe the reason of doing unconditional M_PREPEND in ether_output().
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ethersubr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 5186406..2b82ecc 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -324,6 +324,10 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
/*
* Add local net header. If no space in first mbuf,
* allocate another.
+ *
+ * Note that we do prepend regardless of RT_HAS_HEADER flag.
+ * This is done because BPF code shifts m_data pointer
+ * to the end of ethernet header prior to calling if_output().
*/
M_PREPEND(m, hlen, M_NOWAIT);
if (m == NULL)
OpenPOWER on IntegriCloud