diff --git a/sys/net/if.c b/sys/net/if.c index 4ff11c323916..b0f1a9b5f849 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.146 2004/10/06 03:49:03 itojun Exp $ */ +/* $NetBSD: if.c,v 1.147 2004/10/07 20:06:58 tron Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.146 2004/10/06 03:49:03 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.147 2004/10/07 20:06:58 tron Exp $"); #include "opt_inet.h" @@ -479,6 +479,9 @@ if_attach(ifp) (struct mbuf **)PFIL_IFNET_ATTACH, ifp, PFIL_IFNET); #endif + if (domains) + if_attachdomain1(ifp); + /* Announce the interface. */ rt_ifannouncemsg(ifp, IFAN_ARRIVAL); } @@ -771,8 +774,6 @@ if_clone_create(name) { struct if_clone *ifc; int unit; - int error; - int s; ifc = if_clone_lookup(name, &unit); if (ifc == NULL) @@ -781,15 +782,7 @@ if_clone_create(name) if (ifunit(name) != NULL) return (EEXIST); - error = (*ifc->ifc_create)(ifc, unit); - if (error) - return (error); - - s = splnet(); - if_attachdomain1(ifunit(name)); - splx(s); - - return (error); + return ((*ifc->ifc_create)(ifc, unit)); } /*