From owner-freebsd-net@FreeBSD.ORG Fri May 18 14:30:18 2012 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7F5D4106577C for ; Fri, 18 May 2012 14:30:18 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E9E578FC15 for ; Fri, 18 May 2012 14:30:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4IEUBcp077551 for ; Fri, 18 May 2012 14:30:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4IEUBtg077548; Fri, 18 May 2012 14:30:11 GMT (envelope-from gnats) Date: Fri, 18 May 2012 14:30:11 GMT Message-Id: <201205181430.q4IEUBtg077548@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: John Baldwin Cc: Subject: Re: kern/110284: [if_ethersubr] Invalid Assumption in SIOCSIFADDR in ether_ioctl() X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John Baldwin List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 14:30:18 -0000 The following reply was made to PR kern/110284; it has been noted by GNATS. From: John Baldwin To: freebsd-net@freebsd.org Cc: "Devon H. O'Dell" , bug-followup@freebsd.org, gavin@freebsd.org, Robert Watson Subject: Re: kern/110284: [if_ethersubr] Invalid Assumption in SIOCSIFADDR in ether_ioctl() Date: Fri, 18 May 2012 10:27:49 -0400 On Wednesday, May 16, 2012 10:37:36 pm Devon H. O'Dell wrote: > 2012/5/16 Devon H. O'Dell : > > Hi Gavin, freebsd-net, > > > > --- if_ethersubr.c 2011-09-22 20:51:37.000000000 -0400 > > +++ /home/dho/if_ethersubr.c 2012-05-16 22:27:17.000000000 -0400 > > @@ -1146,7 +1146,9 @@ > > switch (ifa->ifa_addr->sa_family) { > > #ifdef INET > > case AF_INET: > > - ifp->if_init(ifp->if_softc); /* before arpwhohas */ > > + if (ifp->if_flags & IFF_RUNNING == 0) { > > That's probably ((ifp->if_flags & IFF_RUNNING) == 0). Also, I'm not on > freebsd-net or cc'ed on the PR afaik, so please cc me explicitly on > followups if more information is needed. You mean if_drv_flags and IF_DRV_RUNNING. It's a bit fugly, yes, and the new check would be racey. -- John Baldwin