NetBSD-Bugs archive

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

Re: kern/46290: urndis(4) drops to ddb if ifconfig'ed



The following reply was made to PR kern/46290; it has been noted by GNATS.

From: fukumoto%imasy.or.jp@localhost
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/46290: urndis(4) drops to ddb if ifconfig'ed
Date: Mon, 28 May 2012 00:49:24 +0900 (JST)

 With following quick hack seem to remedy the crash.
 
 
                                        FUKUMOTO Atsushi
                                        fukumoto%imasy.or.jp@localhost
 
 
 Index: sys/dev/usb/if_urndis.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/usb/if_urndis.c,v
 retrieving revision 1.3
 diff -u -u -r1.3 if_urndis.c
 --- sys/dev/usb/if_urndis.c    23 Dec 2011 00:51:44 -0000      1.3
 +++ sys/dev/usb/if_urndis.c    27 May 2012 15:34:22 -0000
 @@ -1025,6 +1025,15 @@
  }
  #endif
  
 +static int
 +urndis_init_wrap(struct ifnet *ifp)
 +{
 +      urndis_init(ifp);
 +      if (!(ifp->if_flags & IFF_RUNNING))
 +              return EIO;
 +      return 0;
 +}
 +
  static void
  urndis_init(struct ifnet *ifp)
  {
 @@ -1443,6 +1452,7 @@
        ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
        ifp->if_start = urndis_start;
        ifp->if_ioctl = urndis_ioctl;
 +      ifp->if_init = urndis_init_wrap;
  #if 0
        ifp->if_watchdog = urndis_watchdog;
  #endif
 


Home | Main Index | Thread Index | Old Index