From a479ceccdf3646c7bc3ff60796c765650b3ffc03 Mon Sep 17 00:00:00 2001 From: tuexen Date: Wed, 25 Jan 2012 21:49:48 +0000 Subject: 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. --- usr.bin/netstat/sctp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin') 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 -- cgit v1.1