NetBSD-Bugs archive

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

Re: kern/48310: kue(4) cannot receive multicast packets



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

From: Takahiro HAYASHI <t-hash%abox3.so-net.ne.jp@localhost>
To: David Holland <dholland-bugs%netbsd.org@localhost>, 
gnats-bugs%NetBSD.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, 
netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/48310: kue(4) cannot receive multicast packets
Date: Mon, 14 Oct 2013 09:40:12 +0900

 On Sun, 13 Oct 2013 17:20:00 +0000 (UTC)
 I wrote:
 
 > >Fix:
 >      In the case of SIOC{ADD,DEL}MULTI please call ether_ioctl()
 >      to fill list of ec_multiaddrs before calling kue_setmulti().
 
 This is patch for HEAD and netbsd-6.
 
 Index: src/sys/dev/usb/if_kue.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/usb/if_kue.c,v
 retrieving revision 1.79
 diff -u -p -r1.79 if_kue.c
 --- src/sys/dev/usb/if_kue.c   5 Jan 2013 01:30:15 -0000       1.79
 +++ src/sys/dev/usb/if_kue.c   9 Oct 2013 09:59:17 -0000
 @@ -1038,8 +1038,12 @@ kue_ioctl(struct ifnet *ifp, u_long comm
                break;
        case SIOCADDMULTI:
        case SIOCDELMULTI:
 -              kue_setmulti(sc);
 -              error = 0;
 +              error = ether_ioctl(ifp, command, data);
 +              if (error == ENETRESET) {
 +                      if (ifp->if_flags & IFF_RUNNING)
 +                              kue_setmulti(sc);
 +                      error = 0;
 +              }
                break;
        default:
                error = ether_ioctl(ifp, command, data);
 
 This is patch for netbsd-5.
 
 Index: src/sys/dev/usb/if_kue.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/usb/if_kue.c,v
 retrieving revision 1.63
 diff -u -p -r1.63 if_kue.c
 --- src/sys/dev/usb/if_kue.c   24 May 2008 16:40:58 -0000      1.63
 +++ src/sys/dev/usb/if_kue.c   9 Oct 2013 09:22:32 -0000
 @@ -1118,8 +1118,12 @@ kue_ioctl(struct ifnet *ifp, u_long comm
                break;
        case SIOCADDMULTI:
        case SIOCDELMULTI:
 -              kue_setmulti(sc);
 -              error = 0;
 +              error = ether_ioctl(ifp, command, data);
 +              if (error == ENETRESET) {
 +                      if (ifp->if_flags & IFF_RUNNING)
 +                              kue_setmulti(sc);
 +                      error = 0;
 +              }
                break;
        default:
                error = EINVAL;
 
 --
 t-hash
 


Home | Main Index | Thread Index | Old Index