From owner-freebsd-net@FreeBSD.ORG Tue Sep 9 23:50:54 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 872DD106564A for ; Tue, 9 Sep 2008 23:50:54 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 63D2B8FC1D for ; Tue, 9 Sep 2008 23:50:54 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id C8A1F15E0D4 for ; Tue, 9 Sep 2008 19:31:16 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 09 Sep 2008 19:31:16 -0400 X-Sasl-enc: uvqwfA+q7yWD9le/nNxZwQIOBML/97rPljIp8k6d83kv 1221003076 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 6F4072999E for ; Tue, 9 Sep 2008 19:31:16 -0400 (EDT) Message-ID: <48C70743.1020003@incunabulum.net> Date: Wed, 10 Sep 2008 00:31:15 +0100 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: FreeBSD-Net mailing list X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: 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: Tue, 09 Sep 2008 23:50:54 -0000 Whenever I call this sysctl, I get an errno of EPROGNOTAVAIL from sysctl(): »·······name[0] = CTL_NET; »·······name[1] = PF_LINK; »·······name[2] = NETLINK_GENERIC; »·······name[3] = IFMIB_IFDATA; »·······name[4] = ifindex; »·······name[5] = IFDATA_DRIVERNAME; »·······len = IFNAMSIZ; »·······if (sysctl(name, 6, dname, &len, NULL, 0) == -1) { »·······»·······warnc(EX_OSERR, "cannot obtain driver name for ifname %s", »·······»······· ifname); »·······»·······return (-1); »·······} The ifindex is valid. "dname" is a pointer to an IFNAMSIZ sized buffer. This problem is happening on a 7.0-RELEASE system. 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? cheers BMS