this makes it nicer to set up a custom output routine on ethernet interfaces. rather than overwriting it after ether_ifattach is called, you can set it up with the rest of the callbacks and the ether layer will respect it.
ok? Index: if_ethersubr.c =================================================================== RCS file: /cvs/src/sys/net/if_ethersubr.c,v retrieving revision 1.254 diff -u -p -r1.254 if_ethersubr.c --- if_ethersubr.c 11 Dec 2018 01:27:08 -0000 1.254 +++ if_ethersubr.c 11 Dec 2018 23:48:17 -0000 @@ -510,7 +510,8 @@ ether_ifattach(struct ifnet *ifp) ifp->if_addrlen = ETHER_ADDR_LEN; ifp->if_hdrlen = ETHER_HDR_LEN; ifp->if_mtu = ETHERMTU; - ifp->if_output = ether_output; + if (ifp->if_output == NULL) + ifp->if_output = ether_output; ifp->if_rtrequest = ether_rtrequest; if_ih_insert(ifp, ether_input, NULL);