Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Mar 2001 05:20:02 -0800 (PST)
From:      Peter Pentchev <roam@orbitel.bg>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/26168: /usr/bin/netstat gets bus error with -i -a options
Message-ID:  <200103281320.f2SDK2j05431@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/26168; it has been noted by GNATS.

From: Peter Pentchev <roam@orbitel.bg>
To: jim@reptiles.org
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/26168: /usr/bin/netstat gets bus error with -i -a options
Date: Wed, 28 Mar 2001 16:15:24 +0300

 On Wed, Mar 28, 2001 at 04:37:13AM -0800, jim@reptiles.org wrote:
 > 
 > >Number:         26168
 > >Category:       bin
 > >Synopsis:       /usr/bin/netstat gets bus error with -i -a options
 > >Originator:     Jim Mercer
 > >Release:        4.3-RC
 > >Organization:
 > Reptilian Research
 > >Environment:
 > gw# uname -a
 > FreeBSD gw.reptiles.org 4.3-RC FreeBSD 4.3-RC #0: Tue Mar 27 18:24:41 EST 2001     root@gw.reptiles.org:/usr/src/sys/compile/GENERIC  i386
 > >Description:
 > /usr/bin/netstat gets bus error with -i -a options
 
 I can confirm this; can you try the attached patch?
 
 (multiaddr holds an address in KVM, not in userspace; dereferencing
  it does not give any meaningful value to the user process).
 
 G'luck,
 Peter
 
 -- 
 This inert sentence is my body, but my soul is alive, dancing in the sparks of your brain.
 
 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-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103281320.f2SDK2j05431>