Remove second EVENTHANDLER_REGISTER slipped in r292978.

Describe the reason of doing unconditional M_PREPEND in ether_output().
This commit is contained in:
Alexander V. Chernikov 2016-01-01 10:15:06 +00:00
parent a50b01d224
commit 6cdb18544d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=293035
2 changed files with 4 additions and 3 deletions

View File

@ -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)

View File

@ -1334,8 +1334,5 @@ arp_init(void)
if (IS_DEFAULT_VNET(curvnet))
iflladdr_tag = EVENTHANDLER_REGISTER(iflladdr_event,
arp_iflladdr, NULL, EVENTHANDLER_PRI_ANY);
if (IS_DEFAULT_VNET(curvnet))
iflladdr_tag = EVENTHANDLER_REGISTER(iflladdr_event,
arp_iflladdr, NULL, EVENTHANDLER_PRI_ANY);
}
SYSINIT(arp, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, arp_init, 0);