Only use ifp->if_addrlen after initializing it.\

Problem detected by Andreas Johansson.
This commit is contained in:
is 1999-08-26 20:44:50 +00:00
parent 8f599f97a7
commit 8679b79192
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: smc90cx6.c,v 1.30 1999/05/18 23:55:44 thorpej Exp $ */
/* $NetBSD: smc90cx6.c,v 1.31 1999/08/26 20:44:50 is Exp $ */
/*-
* Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc.
@ -208,7 +208,6 @@ bah_attach_subr(sc)
ifp->if_mtu = ARCMTU;
if_attach(ifp);
arc_ifattach(ifp, linkaddress);
#if NBPFILTER > 0

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_arcsubr.c,v 1.22 1999/08/26 19:56:08 is Exp $ */
/* $NetBSD: if_arcsubr.c,v 1.23 1999/08/26 20:44:50 is Exp $ */
/*
* Copyright (c) 1994, 1995 Ignatios Souvatzis
@ -649,6 +649,7 @@ arc_ifattach(ifp, lla)
log(LOG_ERR,"%s: link address 0 reserved for broadcasts. Please change it and ifconfig %s down up\n",
ifp->if_xname, ifp->if_xname);
}
if_attach(ifp);
if ((sdl = ifp->if_sadl) &&
sdl->sdl_family == AF_LINK) {
sdl->sdl_type = IFT_ARCNET;