set the magic number in a newly-created interface object
before appending it to mgr->interfaces in order to prevent
a possible assertion.
(cherry picked from commit
8c01662048bbdb36c671c210183d7eecedd69e05)
ISC_LINK_INIT(ifp, link);
ns_interfacemgr_attach(mgr, &ifp->mgr);
+ ifp->magic = IFACE_MAGIC;
+
LOCK(&mgr->lock);
ISC_LIST_APPEND(mgr->interfaces, ifp, link);
UNLOCK(&mgr->lock);
- ifp->magic = IFACE_MAGIC;
-
*ifpret = ifp;
}