From owner-freebsd-net@FreeBSD.ORG Wed Sep 10 00:13:35 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFEED1065678 for ; Wed, 10 Sep 2008 00:13:35 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 984588FC16 for ; Wed, 10 Sep 2008 00:13:35 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 1127F15EB74 for ; Tue, 9 Sep 2008 20:13:35 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Tue, 09 Sep 2008 20:13:35 -0400 X-Sasl-enc: 6QUxKJFxQvcnYhlbWeXjL2dyK1qM8UI3+Ev+8TPkHC2B 1221005614 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id A75D32A30D for ; Tue, 9 Sep 2008 20:13:34 -0400 (EDT) Message-ID: <48C7112D.3070309@FreeBSD.org> Date: Wed, 10 Sep 2008 01:13:33 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: FreeBSD-Net mailing list References: <48C70743.1020003@incunabulum.net> In-Reply-To: <48C70743.1020003@incunabulum.net> X-Enigmail-Version: 0.95.6 Content-Type: multipart/mixed; boundary="------------040304080308020907030404" Subject: Re: Problem with IFDATA_DRIVERNAME sysctl 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: Wed, 10 Sep 2008 00:13:35 -0000 This is a multi-part message in MIME format. --------------040304080308020907030404 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Bruce M Simpson wrote: > > It looks like the switch..case in that path could be fubar'd by the > compiler as there are not break statements for each distinct case > label, could this be due to gcc friendly fire? Possibly false alarm or PEBKAC, I wasn't checking return values right in some of my code, although we should probably have "break" there anyway. Patch against RELENG_7_0. --------------040304080308020907030404 Content-Type: text/plain; name="if_mib.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="if_mib.diff" --- if_mib.c.orig 2008-09-10 00:31:25.000000000 +0100 +++ if_mib.c 2008-09-10 00:32:15.000000000 +0100 @@ -90,6 +90,7 @@ switch(name[1]) { default: return ENOENT; + break; case IFDATA_GENERAL: bzero(&ifmd, sizeof(ifmd)); @@ -136,6 +137,7 @@ error = SYSCTL_IN(req, ifp->if_linkmib, ifp->if_linkmiblen); if (error) return error; + break; case IFDATA_DRIVERNAME: /* 20 is enough for 64bit ints */ @@ -152,6 +154,7 @@ error = EPERM; free(dbuf, M_TEMP); return (error); + break; } return 0; } --------------040304080308020907030404--