diff options
author | shin <shin@FreeBSD.org> | 2000-03-11 11:25:00 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-03-11 11:25:00 +0000 |
commit | 45b25e45865fe62c14572c2384591b21f915a426 (patch) | |
tree | 08b79b5fd913ff10b7d24e19fc11cee12ffa6ad8 /usr.bin/sockstat | |
parent | 75af2061c47c9159cf8b1f15ad075f3ca43351d8 (diff) | |
download | FreeBSD-src-45b25e45865fe62c14572c2384591b21f915a426.zip FreeBSD-src-45b25e45865fe62c14572c2384591b21f915a426.tar.gz |
Prevent sockstat print out some empty entries related to IPv6.
Sockstat use netstat tcp/udp socket print, and fstat tcp/udp
socket print, but it just specify all of IPPROTO_IP and
IPPROTO_IPV6 sockets for fstat.
Now IPv6 socket also use raw socket, but only netstat don't print it,
so now they are printed as empty entries in sockstat output.
Approved by: jkh
Diffstat (limited to 'usr.bin/sockstat')
-rw-r--r-- | usr.bin/sockstat/sockstat.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sockstat/sockstat.pl b/usr.bin/sockstat/sockstat.pl index c20f542..02c60d1 100644 --- a/usr.bin/sockstat/sockstat.pl +++ b/usr.bin/sockstat/sockstat.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl5 #- -# Copyright (c) 1999 Dag-Erling Coïdan Smørgrav +# Copyright (c) 1999 Dag-Erling Coïdan Smgrav # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -56,7 +56,7 @@ open FSTAT, "fstat |" or die "'fstat' failed: $!\n"; while (<FSTAT>) { ($user, $cmd, $pid, $fd, $inet, $type, $proto, $sock) = split; chop $fd; - next unless ($inet =~ m/^internet6?$/); + next unless ($inet =~ m/^internet6?$/) && ($type ne "raw"); ($proto, $laddr, $faddr) = ($proto{$sock}, $myaddr{$sock}, $hisaddr{$sock}); write STDOUT; |