From owner-freebsd-current@FreeBSD.ORG Fri Aug 29 20:12:59 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A84D16A4BF for ; Fri, 29 Aug 2003 20:12:59 -0700 (PDT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id C40F243FDF for ; Fri, 29 Aug 2003 20:12:57 -0700 (PDT) (envelope-from bleez@comcast.net) Received: from gravy.homeunix.net ([68.81.196.221]) by comcast.net (sccrmhc13) with ESMTP id <20030830031249016001vkpge>; Sat, 30 Aug 2003 03:12:49 +0000 Received: from gravy.homeunix.net (gravy.homeunix.net [192.168.1.2]) by gravy.homeunix.net (8.12.9/8.12.9) with ESMTP id h7U3CmLi042627; Fri, 29 Aug 2003 23:12:48 -0400 (EDT) (envelope-from bleez@comcast.net) Date: Fri, 29 Aug 2003 23:12:48 -0400 (EDT) From: Bryan Liesner To: "Kenneth D. Merry" In-Reply-To: <20030829233910.GA41686@panzer.kdm.org> Message-ID: <20030829223808.C13130@gravy.homeunix.net> References: <20030829233910.GA41686@panzer.kdm.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: ifconfig -a blows up if /etc/mac.conf isn't installed X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 03:12:59 -0000 On Fri, 29 Aug 2003, Kenneth D. Merry wrote: > > I've figured out that after some recent posix1e upgrades (mac stuff?), > ifconfig -a will blow up if mac.conf isn't there: > > # mv /etc/mac.conf /etc/mac.conf.backup > # ifconfig -a > fxp0: flags=8843 mtu 1500 > inet 10.0.0.6 netmask 0xffffff00 broadcast 10.0.0.255 > ether 00:30:48:21:bb:74 > media: Ethernet autoselect (100baseTX ) > status: active > Memory fault (core dumped) Same here. I took a look, and found that line 62 of /usr/src/sbin/ifconfig/ifmac.c returns ENOENT, but the docs say this should return a -1. So this code looks correct. from ifmac.c: if (mac_prepare_ifnet_label(&label) == -1) I think the correct fix is in /usr/src/lib/libc/posix1e/mac.c Try this patch, rebuild libc, then rebuild ifconfig. --- lib/libc/posix1e/mac.c.orig Fri Aug 29 22:42:44 2003 +++ lib/libc/posix1e/mac.c Fri Aug 29 22:43:19 2003 @@ -365,7 +365,7 @@ return (mac_prepare(mac, ld->ld_labels)); } - return (ENOENT); /* XXXMAC: ENOLABEL */ + return (-1); /* XXXMAC: ENOLABEL */ } int