diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_ethersubr.c | 4 | ||||
-rw-r--r-- | sys/netinet/if_ether.c | 3 |
2 files changed, 4 insertions, 3 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) diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 0bf5cec..7a06bea 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -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); |