Date: Wed, 10 Sep 2008 00:31:15 +0100 From: Bruce M Simpson <bms@incunabulum.net> To: FreeBSD-Net mailing list <freebsd-net@freebsd.org> Subject: Problem with IFDATA_DRIVERNAME sysctl Message-ID: <48C70743.1020003@incunabulum.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48C70743.1020003>