Index: if.c =================================================================== RCS file: /cvs/src/sys/net/if.c,v retrieving revision 1.612 diff -u -p -r1.612 if.c --- if.c 10 Jul 2020 13:23:34 -0000 1.612 +++ if.c 16 Jul 2020 04:22:07 -0000 @@ -520,16 +520,6 @@ if_attachdomain(struct ifnet *ifp) } void -if_attachhead(struct ifnet *ifp) -{ - if_attach_common(ifp); - NET_LOCK(); - TAILQ_INSERT_HEAD(&ifnet, ifp, if_list); - if_attachsetup(ifp); - NET_UNLOCK(); -} - -void if_attach(struct ifnet *ifp) { if_attach_common(ifp); Index: if.h =================================================================== RCS file: /cvs/src/sys/net/if.h,v retrieving revision 1.203 diff -u -p -r1.203 if.h --- if.h 25 Jul 2019 15:23:39 -0000 1.203 +++ if.h 16 Jul 2020 04:22:07 -0000 @@ -530,8 +530,6 @@ void if_attach(struct ifnet *); void if_attach_queues(struct ifnet *, unsigned int); void if_attach_iqueues(struct ifnet *, unsigned int); void if_attach_ifq(struct ifnet *, const struct ifq_ops *, void *); -void if_attachtail(struct ifnet *); -void if_attachhead(struct ifnet *); void if_deactivate(struct ifnet *); void if_detach(struct ifnet *); void if_down(struct ifnet *); Index: if_loop.c =================================================================== RCS file: /cvs/src/sys/net/if_loop.c,v retrieving revision 1.90 diff -u -p -r1.90 if_loop.c --- if_loop.c 8 Jan 2020 09:09:10 -0000 1.90 +++ if_loop.c 16 Jul 2020 04:22:07 -0000 @@ -178,12 +178,11 @@ loop_clone_create(struct if_clone *ifc, ifp->if_output = looutput; ifp->if_type = IFT_LOOP; ifp->if_hdrlen = sizeof(u_int32_t); + if_attach(ifp); if (unit == 0) { - if_attachhead(ifp); if_addgroup(ifp, ifc->ifc_name); rtable_l2set(0, 0, ifp->if_index); - } else - if_attach(ifp); + } if_alloc_sadl(ifp); #if NBPFILTER > 0 bpfattach(&ifp->if_bpf, ifp, DLT_LOOP, sizeof(u_int32_t));