On Wed, Mar 28, 2001 at 03:42:10PM +0200, Jose M. Alcaide wrote:
> Jim Mercer wrote:
> >
> > netstat gets a bus error if handed the -a option and the -i option.
> >
>
> Me too:
>
> $ uname -v
> FreeBSD 4.3-RC #0: Wed Mar 28 15:11:51 CEST 2001
>[EMAIL PROTECTED]:/usr/obj/usr/src/sys/SATURNO
> $ netstat -ai
> Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
> fxp0 1500 <Link#1> 00:90:27:17:09:28 9792 0 789 0 44
> Bus error
>
> I am getting this error on all machines I have running 4.3-RC:
> MP and UP, desktops and laptops, with and without IPv6 :-(
Okay; Jim Mercer already confirmed the attached patch worked for him.
Can more people test and review it?
G'luck,
Peter
--
I've heard that this sentence is a rumor.
Index: src/usr.bin/netstat/if.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/netstat/if.c,v
retrieving revision 1.32.2.5
diff -u -r1.32.2.5 if.c
--- src/usr.bin/netstat/if.c 2001/03/22 13:48:42 1.32.2.5
+++ src/usr.bin/netstat/if.c 2001/03/28 13:14:35
@@ -448,9 +448,10 @@
const char *fmt;
LIST_FOREACH(multiaddr, &ifnet.if_multiaddrs, ifma_link) {
- if (kread(*(u_long *)multiaddr, (char *)&ifma,
+ if (kread((u_long)multiaddr, (char *)&ifma,
sizeof ifma))
break;
+ multiaddr = &ifma;
if (kread((u_long)ifma.ifma_addr, (char *)&msa,
sizeof msa))
break;
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message