summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-02-06 03:26:11 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-02-06 03:26:11 +0000
commite6f70a42d619d942d4135ad575ee50c55d84237f (patch)
treecc6340a5c269a518105dda0a72b9b1e84984a7df /sys
parent68f3d86c8f544e061abece3768d671823bc80ea2 (diff)
allow configuring gif ifaces; itojun@ ok
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_gif.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index c0bfc13fe5f..8ec194b2efb 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gif.c,v 1.11 2000/12/31 22:32:28 angelos Exp $ */
+/* $OpenBSD: if_gif.c,v 1.12 2001/02/06 03:26:10 mickey Exp $ */
/* $KAME: if_gif.c,v 1.32 2000/10/07 03:20:55 itojun Exp $ */
/*
@@ -73,7 +73,6 @@
#include <net/if_gif.h>
-#include "gif.h"
#include "bpfilter.h"
#include "bridge.h"
@@ -81,23 +80,22 @@
extern int ifqmaxlen;
-#if NGIF > 0
-
+int ngif;
void gifattach __P((int));
/*
* gif global variable definitions
*/
-int ngif = NGIF; /* number of interfaces */
struct gif_softc *gif = 0;
void
-gifattach(dummy)
- int dummy;
+gifattach(n)
+ int n;
{
register struct gif_softc *sc;
register int i;
+ ngif = n;
gif = sc = malloc (ngif * sizeof(struct gif_softc), M_DEVBUF, M_WAIT);
bzero(sc, ngif * sizeof(struct gif_softc));
for (i = 0; i < ngif; sc++, i++) {
@@ -451,4 +449,3 @@ gif_ioctl(ifp, cmd, data)
bad:
return error;
}
-#endif /*NGIF > 0*/