Initialize interface type to IFT_TUNNEL as suggested by Erik Änggård

in PR kern/25555.
This commit is contained in:
tron 2004-05-13 11:31:09 +00:00
parent 7d553415ce
commit edadbda9d6

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_tun.c,v 1.68 2004/03/01 13:54:02 tron Exp $ */ /* $NetBSD: if_tun.c,v 1.69 2004/05/13 11:31:09 tron Exp $ */
/* /*
* Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk> * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
@ -15,7 +15,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.68 2004/03/01 13:54:02 tron Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.69 2004/05/13 11:31:09 tron Exp $");
#include "tun.h" #include "tun.h"
@ -41,7 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.68 2004/03/01 13:54:02 tron Exp $");
#include <machine/cpu.h> #include <machine/cpu.h>
#include <net/if.h> #include <net/if.h>
#include <net/if_ether.h> #include <net/if_types.h>
#include <net/netisr.h> #include <net/netisr.h>
#include <net/route.h> #include <net/route.h>
@ -155,6 +155,7 @@ tunattach0(sc)
ifp->if_start = tunstart; ifp->if_start = tunstart;
#endif #endif
ifp->if_flags = IFF_POINTOPOINT; ifp->if_flags = IFF_POINTOPOINT;
ifp->if_type = IFT_TUNNEL;
ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_snd.ifq_maxlen = ifqmaxlen;
ifp->if_collisions = 0; ifp->if_collisions = 0;
ifp->if_ierrors = 0; ifp->if_ierrors = 0;