diff options
author | tuexen <tuexen@FreeBSD.org> | 2012-01-25 21:49:48 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2012-01-25 21:49:48 +0000 |
commit | a479ceccdf3646c7bc3ff60796c765650b3ffc03 (patch) | |
tree | beec4023d6af21aec161cb5c02fdde66b25ef6f5 /usr.bin/netstat | |
parent | 66de9e7c5cc91d05f67a65f599bf55640ddaee77 (diff) | |
download | FreeBSD-src-a479ceccdf3646c7bc3ff60796c765650b3ffc03.zip FreeBSD-src-a479ceccdf3646c7bc3ff60796c765650b3ffc03.tar.gz |
Don't print a warning when using netstat to print
SCTP statistics when there is not SCTP in the kernel.
This problem was reported by Sean Mahood.
MFC after: 1 week.
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/sctp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/netstat/sctp.c b/usr.bin/netstat/sctp.c index fb94d44..3f13b71 100644 --- a/usr.bin/netstat/sctp.c +++ b/usr.bin/netstat/sctp.c @@ -611,7 +611,8 @@ sctp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) memset(&zerostat, 0, len); if (sysctlbyname("net.inet.sctp.stats", &sctpstat, &len, zflag ? &zerostat : NULL, zflag ? len : 0) < 0) { - warn("sysctl: net.inet.sctp.stats"); + if (errno != ENOENT) + warn("sysctl: net.inet.sctp.stats"); return; } } else |