Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Only use ifp->if_addrlen after initializing it.\



details:   https://anonhg.NetBSD.org/src/rev/db1a6312a914
branches:  trunk
changeset: 475821:db1a6312a914
user:      is <is%NetBSD.org@localhost>
date:      Thu Aug 26 20:44:50 1999 +0000

description:
Only use ifp->if_addrlen after initializing it.\
Problem detected by Andreas Johansson.

diffstat:

 sys/dev/ic/smc90cx6.c |  3 +--
 sys/net/if_arcsubr.c  |  3 ++-
 2 files changed, 3 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r ca8d7f0383b8 -r db1a6312a914 sys/dev/ic/smc90cx6.c
--- a/sys/dev/ic/smc90cx6.c     Thu Aug 26 20:28:53 1999 +0000
+++ b/sys/dev/ic/smc90cx6.c     Thu Aug 26 20:44:50 1999 +0000
@@ -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 @@
 
        ifp->if_mtu = ARCMTU;
 
-       if_attach(ifp);
        arc_ifattach(ifp, linkaddress);
 
 #if NBPFILTER > 0
diff -r ca8d7f0383b8 -r db1a6312a914 sys/net/if_arcsubr.c
--- a/sys/net/if_arcsubr.c      Thu Aug 26 20:28:53 1999 +0000
+++ b/sys/net/if_arcsubr.c      Thu Aug 26 20:44:50 1999 +0000
@@ -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 @@
                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;



Home | Main Index | Thread Index | Old Index