Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/net Pull up following revision(s) (requested by ozaki...



details:   https://anonhg.NetBSD.org/src/rev/ce7671f807e5
branches:  netbsd-6
changeset: 776680:ce7671f807e5
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Aug 07 09:39:55 2014 +0000

description:
Pull up following revision(s) (requested by ozaki-r in ticket #1103):
        sys/net/link_proto.c    revision 1.17
Don't assume if_init is always set. if_init may be NULL, e.g., if_vlan.
PR kern/48997.

diffstat:

 sys/net/link_proto.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 0165665187e9 -r ce7671f807e5 sys/net/link_proto.c
--- a/sys/net/link_proto.c      Thu Aug 07 09:31:09 2014 +0000
+++ b/sys/net/link_proto.c      Thu Aug 07 09:39:55 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: link_proto.c,v 1.7 2011/10/07 16:34:31 dyoung Exp $    */
+/*     $NetBSD: link_proto.c,v 1.7.8.1 2014/08/07 09:39:55 msaitoh Exp $       */
 
 /*-
  * Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.7 2011/10/07 16:34:31 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.7.8.1 2014/08/07 09:39:55 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/socket.h>
@@ -197,7 +197,8 @@
                splx(s);
                if (error != ENETRESET)
                        return error;
-               else if ((ifp->if_flags & IFF_RUNNING) != 0)
+               else if ((ifp->if_flags & IFF_RUNNING) != 0 &&
+                        ifp->if_init != NULL)
                        return (*ifp->if_init)(ifp);
                else
                        return 0;



Home | Main Index | Thread Index | Old Index