From: Hiroshi Ito <ito@dual.mlb.co.jp>
Subject: Re: netstat causing unaligned trap
Date: 1998/03/08 [thread overview]
Message-ID: <m1vhtqy1el.fsf@dual.mlb.co.jp> (raw)
In-Reply-To: bruck-0503982219300001@aragorn.bruck.net
bruck@pacificnet.net (Ronald Bruck) writes:
> Can anybody explain what could cause this: when I run the "netstat"
> command without any options, on the system console I get
>
> netstat(3275): unaligned trap at 00000155556b8b1c: 00000011ffff884 2d 10
here is a patch to fix it.
or you can get rpm from
ftp://ftp.mlb.co.jp/pub/linux/alpha2/RPMS/net-tools-1.33-5.alpha.rpm
--- net-tools-1.33/netstat.c.orig Tue Mar 3 01:49:17 1998
+++ net-tools-1.33/netstat.c Tue Mar 3 03:37:27 1998
@@ -248,11 +248,14 @@
(void) fclose(procinfo);
lnr--; free_to = lnr--;
while (lnr >= 0) {
+ unsigned long laddr, raddr;
num = sscanf(line[lnr--],
"%d: %lX:%X %lX:%X %X %lX:%lX %X:%lX %lX %d\n",
- &d, (unsigned long*)&localaddr.sin_addr.s_addr, &local_port,
- (unsigned long*)&remaddr.sin_addr.s_addr, &rem_port, &state,
+ &d, &laddr, &local_port,
+ &raddr, &rem_port, &state,
&txq, &rxq, &timer_run, &time_len, &retr, &uid);
+ localaddr.sin_addr.s_addr = laddr;
+ remaddr.sin_addr.s_addr = raddr;
if (flag_deb) fprintf(stderr, NLS_CATGETS(catfd, netstatSet, netstat_arg
s,
"%s -> %d args"), line[lnr+1],
num);
if (num < 11) continue; /* 13 ? */
@@ -405,14 +408,17 @@
lnr--; free_to = lnr--;
while (lnr >= 0) {
+ unsigned long laddr, raddr;
more[0] = '\0';
timer_queued = '\0';
num = sscanf(line[lnr--],
"%d: %lX:%X %lX:%X %X %lX:%lX %X:%lX %lX %c %s\n",
- &d, (unsigned long*)&localaddr.sin_addr.s_addr, &local_port,
- (unsigned long*)&remaddr.sin_addr.s_addr, &rem_port, &state,
+ &d, &laddr, &local_port,
+ &raddr, &rem_port, &state,
&txq, &rxq, &timer_run, &time_len, &retr,
&timer_queued, more);
+ localaddr.sin_addr.s_addr = laddr;
+ remaddr.sin_addr.s_addr = raddr;
localaddr.sin_family = AF_INET;
remaddr.sin_family = AF_INET;
if ((ap = get_afntype(localaddr.sin_family)) == NULL) {
@@ -528,15 +534,18 @@
lnr--; free_to = lnr--;
while (lnr >= 0) {
+ unsigned long laddr, raddr;
more[0] = '\0';
timer_queued = '\0';
num = sscanf(line[lnr--],
"%d: %lX:%X %lX:%X %X %lX:%lX %X:%lX %lX %c %s\n",
- &d, (unsigned long*)&localaddr.sin_addr.s_addr, &local_port,
- (unsigned long*)&remaddr.sin_addr.s_addr, &rem_port, &state,
+ &d, &laddr, &local_port,
+ &raddr, &rem_port, &state,
&txq, &rxq, &timer_run, &time_len, &retr,
&timer_queued, more);
retr = 0L;
+ localaddr.sin_addr.s_addr = laddr;
+ remaddr.sin_addr.s_addr = raddr;
localaddr.sin_family = AF_INET;
remaddr.sin_family = AF_INET;
if ((ap = get_afntype(localaddr.sin_family)) == NULL) {
--------
Hiroshi Ito<ito@mlb.co.jp>
Media Lab. Inc.
URL http://www.mlb.co.jp (Japanese Only)
TEL 03-5294-7255 FAX 03-5294-7256
prev parent reply other threads:[~1998-03-08 5:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-03-05 5:00 netstat causing unaligned trap Ronald Bruck
1998-03-08 5:00 ` Hiroshi Ito [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox