Not having ipv6 in your kernel is not an error and should not be reported.

MFC after:	1 week
This commit is contained in:
Julian Elischer 2006-07-14 23:32:43 +00:00
parent d7fac9732b
commit 109dad819f

View File

@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$");
#include <netdb.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include "netstat.h"
@ -1030,7 +1031,9 @@ rip6_stats(u_long off __unused, const char *name, int af1 __unused)
mib[3] = IPV6CTL_RIP6STATS;
l = sizeof(rip6stat);
if (sysctl(mib, 4, &rip6stat, &l, NULL, 0) < 0) {
perror("Warning: sysctl(net.inet6.ip6.rip6stats)");
/* Just shut up if the kernel doesn't have ipv6. */
if (errno != ENOENT)
perror("Warning: sysctl(net.inet6.ip6.rip6stats)");
return;
}