svn commit: r238872 - stable/9/sbin/ifconfig
Hiroki Sato
hrs at FreeBSD.org
Sat Jul 28 21:43:30 UTC 2012
Author: hrs
Date: Sat Jul 28 21:43:29 2012
New Revision: 238872
URL: http://svn.freebsd.org/changeset/base/238872
Log:
MFC r235285:
Skip nd6 line with no warning message when the system does not support
INET6.
Spotted by: flo
Approved by: re (kib)
Modified:
stable/9/sbin/ifconfig/af_nd6.c
Directory Properties:
stable/9/sbin/ifconfig/ (props changed)
Modified: stable/9/sbin/ifconfig/af_nd6.c
==============================================================================
--- stable/9/sbin/ifconfig/af_nd6.c Sat Jul 28 20:31:39 2012 (r238871)
+++ stable/9/sbin/ifconfig/af_nd6.c Sat Jul 28 21:43:29 2012 (r238872)
@@ -148,12 +148,14 @@ nd6_status(int s)
memset(&nd, 0, sizeof(nd));
strncpy(nd.ifname, ifr.ifr_name, sizeof(nd.ifname));
if ((s6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
- warn("socket(AF_INET6, SOCK_DGRAM)");
+ if (errno != EPROTONOSUPPORT)
+ warn("socket(AF_INET6, SOCK_DGRAM)");
return;
}
error = ioctl(s6, SIOCGIFINFO_IN6, &nd);
if (error) {
- warn("ioctl(SIOCGIFINFO_IN6)");
+ if (errno != EPFNOSUPPORT)
+ warn("ioctl(SIOCGIFINFO_IN6)");
close(s6);
return;
}
More information about the svn-src-stable-9
mailing list