Date: Wed, 28 Mar 2001 16:45:41 +0300 From: Peter Pentchev <roam@orbitel.bg> To: "Jose M. Alcaide" <jose@we.lc.ehu.es> Cc: Jim Mercer <jim@reptiles.org>, hackers@FreeBSD.ORG Subject: Re: 4.3-RC bug in /usr/bin/netstat Message-ID: <20010328164541.J5524@ringworld.oblivion.bg> In-Reply-To: <3AC1EA32.77715A14@we.lc.ehu.es>; from jose@we.lc.ehu.es on Wed, Mar 28, 2001 at 03:42:10PM %2B0200 References: <20010328073324.O29550@reptiles.org> <3AC1EA32.77715A14@we.lc.ehu.es>
next in thread | previous in thread | raw e-mail | index | archive | help
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 toor@saturno.we.lc.ehu.es:/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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010328164541.J5524>
