From owner-freebsd-net@FreeBSD.ORG Thu May 17 02:33:32 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8656106566C; Thu, 17 May 2012 02:33:31 +0000 (UTC) (envelope-from devon.odell@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 924948FC14; Thu, 17 May 2012 02:33:31 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so2108163pbb.13 for ; Wed, 16 May 2012 19:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=y7r/0pls5aYHJhvPsGhOi+fNYApL/09uq4YwjNf2PCo=; b=PIoc/6TXKvULdrkJQrXHaOBOyCMvRx3vEsJmaT4D5mQKWB17R4rh8WnwZqjTjNykO2 Yy2Hzk0troubFqrAneE+fLSIMt6wjzXWtLPfE8yC7wvlOa53PT2Jt4WjpRU5JRTZsUxk elwzaEoiMmC+Oj92cBKUzU22lPwKBcKdkVQrHjn115KNZE0Q647aKqkM5ZdTBEG96T0N lTjjK98ca6zR5M7Xh/cE9f+jpXNY/NF9Z8/BL+5GnPQoGoh6BymNpzfe4GJ2dkcTiYlw eM/qVrTlkQM9RXTvUt1viN8qwniI8VAC+VheeMf8ot0Boqn/9POKOBKKOdd8/XoYEj2Y Yn2A== MIME-Version: 1.0 Received: by 10.68.241.161 with SMTP id wj1mr22372781pbc.112.1337222011214; Wed, 16 May 2012 19:33:31 -0700 (PDT) Received: by 10.68.204.162 with HTTP; Wed, 16 May 2012 19:33:31 -0700 (PDT) Date: Wed, 16 May 2012 22:33:31 -0400 Message-ID: From: "Devon H. O'Dell" To: bug-followup@FreeBSD.org, freebsd-net@freebsd.org, gavin@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 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 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 02:33:32 -0000 Hi Gavin, freebsd-net, I submitted this PR when I worked at Coyote Point. I'm no longer there, but I do remember this issue well. The discussion around this patch happened on IRC and not the PR, which is unfortunate. If I recall correctly, rwatson's stance was that the real fix was to fix the heinous layer between ioctl and device. As far as I'm aware, this is still an issue with current drivers, and this patch still solves the issue. CP ran with it successfully for years. (And unsuccessfully for a time before it was implemented :)). The patch is basically (forgive formatting): --- 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) { + ifp->if_init(ifp->if_softc); /* before arpwhohas */ + } arp_ifinit(ifp, ifa); break; #endif