summaryrefslogtreecommitdiffstats
path: root/sys/net/if_faith.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_faith.c')
-rw-r--r--sys/net/if_faith.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/net/if_faith.c b/sys/net/if_faith.c
index db4c1d9..907dcce 100644
--- a/sys/net/if_faith.c
+++ b/sys/net/if_faith.c
@@ -79,8 +79,6 @@
#include <netinet6/ip6_var.h>
#endif
-#define FAITHNAME "faith"
-
struct faith_softc {
struct ifnet *sc_ifp;
};
@@ -95,12 +93,12 @@ static int faithprefix(struct in6_addr *);
static int faithmodevent(module_t, int, void *);
-static MALLOC_DEFINE(M_FAITH, FAITHNAME, "Firewall Assisted Tunnel Interface");
+static const char faithname[] = "faith";
+static MALLOC_DEFINE(M_FAITH, faithname, "Firewall Assisted Tunnel Interface");
static int faith_clone_create(struct if_clone *, int, caddr_t);
static void faith_clone_destroy(struct ifnet *);
-
-IFC_SIMPLE_DECLARE(faith, 0);
+static struct if_clone *faith_cloner;
#define FAITHMTU 1500
@@ -113,8 +111,8 @@ faithmodevent(mod, type, data)
switch (type) {
case MOD_LOAD:
- if_clone_attach(&faith_cloner);
-
+ faith_cloner = if_clone_simple(faithname, faith_clone_create,
+ faith_clone_destroy, 0);
#ifdef INET6
faithprefix_p = faithprefix;
#endif
@@ -125,7 +123,7 @@ faithmodevent(mod, type, data)
faithprefix_p = NULL;
#endif
- if_clone_detach(&faith_cloner);
+ if_clone_detach(faith_cloner);
break;
default:
return EOPNOTSUPP;
@@ -159,7 +157,7 @@ faith_clone_create(ifc, unit, params)
}
ifp->if_softc = sc;
- if_initname(sc->sc_ifp, ifc->ifc_name, unit);
+ if_initname(sc->sc_ifp, faithname, unit);
ifp->if_mtu = FAITHMTU;
/* Change to BROADCAST experimentaly to announce its prefix. */
OpenPOWER on IntegriCloud