Subject: netstat -inv in /etc/daily
To: None <tech-net@netbsd.org>
From: None <itojun@iijlab.net>
List: tech-net
Date: 06/04/2000 00:10:00
------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <1501.960044988.1@coconut.itojun.org>
Content-Transfer-Encoding: 7bit
do people still object if I make the following change? netstat -in in
/etc/daily truncates important information, even for IPv4 cases (and
usually useless for IPv6).
itojun
------- =_aaaaaaaaaa0
Content-Type: message/rfc822
To: jbernard@mines.edu
cc: gnats-bugs@gnats.netbsd.org
In-reply-to: jbernard's message of Thu, 01 Jun 2000 07:01:31 CST.
<200006011301.e51D1Vn06545@zoo>
Subject: Re: misc/10249: /etc/daily thinks appletalk is ipv6
From: itojun@iijlab.net
Date: Sun, 04 Jun 2000 00:08:37 +0900
Message-ID: <1463.960044917@coconut.itojun.org>
Sender: itojun@coconut.itojun.org
>>Synopsis: /etc/daily thinks appletalk is ipv6
>>Description:
> /etc/daily distinguishes between ipv4 and ipv6 by the presence of
> a ":" in the third field of "netstat -in" output. However, appletalk
> networks are listed with the prefix "atalk:", so /etc/daily thinks
> these are ipv6, even though there's no ipv6 anywhere on the local
> network. For example:
>
>IPv6 network:
>Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Colls
>de0 1500 atalk:1-65534 65280.249 266 0 187 0 0
>lo0 32972 atalk:0 0.0 370 0 370 0 0
The IPv6 output (actually, lines with colon) is separated from
others because people seem to dislike netstat -inv output
note that, even for IPv4, netstat -in truncates important columns,
like below:
>ep0 1500 210.160.95.96 210.160.95.104 160 0 131 0 0
>ep0 1500 210.160.95.96/28 210.160.95.104 170 0 144 0 0
the correct fix would be to use netstat -inv for all the address
families, removing colon trick.
itojun
Index: daily
===================================================================
RCS file: /cvsroot/basesrc/etc/daily,v
retrieving revision 1.32
diff -u -r1.32 daily
--- daily 2000/01/20 04:13:54 1.32
+++ daily 2000/06/03 15:08:26
@@ -187,11 +187,7 @@
if checkyesno check_network; then
echo ""
echo "network:"
- # excluding IPv6
- netstat -in | awk 'NR == 1 {print;} NR > 1 {if ($3 !~ /:/) print; }'
- echo ""
- echo "IPv6 network:"
- netstat -inv | awk 'NR == 1 {print;} NR > 1 {if ($3 ~ /:/) print; }'
+ netstat -inv
echo ""
t=/var/rwho/*
if [ "$t" != '/var/rwho/*' ]; then
------- =_aaaaaaaaaa0--