diff options
Diffstat (limited to 'sys/net/if_gif.c')
-rw-r--r-- | sys/net/if_gif.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 783607b..9fef6c7 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -88,7 +88,7 @@ #include <security/mac/mac_framework.h> -#define GIFNAME "gif" +static const char gifname[] = "gif"; /* * gif_mtx protects the global gif_softc_list. @@ -106,8 +106,7 @@ void (*ng_gif_detach_p)(struct ifnet *ifp); static void gif_start(struct ifnet *); static int gif_clone_create(struct if_clone *, int, caddr_t); static void gif_clone_destroy(struct ifnet *); - -IFC_SIMPLE_DECLARE(gif, 0); +static struct if_clone *gif_cloner; static int gifmodevent(module_t, int, void *); @@ -171,7 +170,7 @@ gif_clone_create(ifc, unit, params) GIF_LOCK_INIT(sc); GIF2IFP(sc)->if_softc = sc; - if_initname(GIF2IFP(sc), ifc->ifc_name, unit); + if_initname(GIF2IFP(sc), gifname, unit); sc->encap_cookie4 = sc->encap_cookie6 = NULL; sc->gif_options = GIF_ACCEPT_REVETHIP; @@ -256,11 +255,12 @@ gifmodevent(mod, type, data) switch (type) { case MOD_LOAD: mtx_init(&gif_mtx, "gif_mtx", NULL, MTX_DEF); - if_clone_attach(&gif_cloner); + gif_cloner = if_clone_simple(gifname, gif_clone_create, + gif_clone_destroy, 0); break; case MOD_UNLOAD: - if_clone_detach(&gif_cloner); + if_clone_detach(gif_cloner); mtx_destroy(&gif_mtx); break; default: |