svn commit: r230555 - head/usr.bin/netstat

Michael Tuexen tuexen at FreeBSD.org
Wed Jan 25 21:49:49 UTC 2012


Author: tuexen
Date: Wed Jan 25 21:49:48 2012
New Revision: 230555
URL: http://svn.freebsd.org/changeset/base/230555

Log:
  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.

Modified:
  head/usr.bin/netstat/sctp.c

Modified: head/usr.bin/netstat/sctp.c
==============================================================================
--- head/usr.bin/netstat/sctp.c	Wed Jan 25 20:54:16 2012	(r230554)
+++ head/usr.bin/netstat/sctp.c	Wed Jan 25 21:49:48 2012	(r230555)
@@ -611,7 +611,8 @@ sctp_stats(u_long off, const char *name,
 			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


More information about the svn-src-all mailing list