ifconfig -a blows up if /etc/mac.conf isn't installed

2003-08-30 Thread Kenneth D. Merry

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=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
inet 10.0.0.6 netmask 0xff00 broadcast 10.0.0.255
ether 00:30:48:21:bb:74
media: Ethernet autoselect (100baseTX full-duplex)
status: active
Memory fault (core dumped) 
# mv /etc/mac.conf.backup /etc/mac.conf
# ifconfig -a
fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
inet 10.0.0.6 netmask 0xff00 broadcast 10.0.0.255
ether 00:30:48:21:bb:74
media: Ethernet autoselect (100baseTX full-duplex)
status: active
ti0: flags=8802BROADCAST,SIMPLEX,MULTICAST mtu 1500
options=1bRXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING
ether 00:02:e3:00:34:10
media: Ethernet autoselect
status: no carrier
lp0: flags=8810POINTOPOINT,SIMPLEX,MULTICAST mtu 1500
lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384
inet 127.0.0.1 netmask 0xff00 

Ken
-- 
Kenneth Merry
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ifconfig -a blows up if /etc/mac.conf isn't installed

2003-08-30 Thread Bryan Liesner
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=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
 inet 10.0.0.6 netmask 0xff00 broadcast 10.0.0.255
 ether 00:30:48:21:bb:74
 media: Ethernet autoselect (100baseTX full-duplex)
 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

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]