diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2005-06-28 06:55:45 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2005-06-28 06:55:45 +0000 |
| commit | 066b192e3b0cf42337e6a6736e04a96968456db3 (patch) | |
| tree | 11f8d63495911674ae48fb598963fa1c850c703e | |
| parent | 67c7ede6d288b15541de91fddee88205063a3150 (diff) | |
Notes
| -rw-r--r-- | sys/net/if_gre.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index eae1f16c86516..90f54c980e06d 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -169,10 +169,16 @@ gre_clone_create(ifc, unit) sc = malloc(sizeof(struct gre_softc), M_GRE, M_WAITOK | M_ZERO); - if_initname(GRE2IFP(sc), ifc->ifc_name, unit); + GRE2IFP(sc) = if_alloc(IFT_TUNNEL); + if (GRE2IFP(sc) == NULL) { + free(sc, M_GRE); + return (ENOSPC); + } + GRE2IFP(sc)->if_softc = sc; + if_initname(GRE2IFP(sc), ifc->ifc_name, unit); + GRE2IFP(sc)->if_snd.ifq_maxlen = IFQ_MAXLEN; - GRE2IFP(sc)->if_type = IFT_TUNNEL; GRE2IFP(sc)->if_addrlen = 0; GRE2IFP(sc)->if_hdrlen = 24; /* IP + GRE */ GRE2IFP(sc)->if_mtu = GREMTU; |
