summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2010-04-28 00:49:24 +0000
committerdelphij <delphij@FreeBSD.org>2010-04-28 00:49:24 +0000
commit248d9cd26d04261a18656cb19e504268ca0d3fe2 (patch)
tree1c853c2e2faae75f42182f464b78198b5170f25a /share
parentf74ef765d28859212ddb2f16729ec4e240bc95c2 (diff)
downloadFreeBSD-src-248d9cd26d04261a18656cb19e504268ca0d3fe2.zip
FreeBSD-src-248d9cd26d04261a18656cb19e504268ca0d3fe2.tar.gz
MFC r206637:
When an underlying ioctl(2) handler returns an error, our ioctl(2) interface considers that it hits a fatal error, and will not copyout the request structure back for _IOW and _IOWR ioctls, keeping them untouched. The previous implementation of the SIOCGIFDESCR ioctl intends to feed the buffer length back to userland. However, if we return an error, the feedback would be defeated and ifconfig(8) would trap into an infinite loop. This commit changes SIOCGIFDESCR to set buffer field to NULL to indicate the previous ENAMETOOLONG case. Reported by: bschmidt
Diffstat (limited to 'share')
-rw-r--r--share/man/man4/netintro.49
1 files changed, 6 insertions, 3 deletions
diff --git a/share/man/man4/netintro.4 b/share/man/man4/netintro.4
index 348a13e..3e98940 100644
--- a/share/man/man4/netintro.4
+++ b/share/man/man4/netintro.4
@@ -32,7 +32,7 @@
.\" @(#)netintro.4 8.2 (Berkeley) 11/30/93
.\" $FreeBSD$
.\"
-.Dd January 26, 2010
+.Dd April 14, 2010
.Dt NETINTRO 4
.Os
.Sh NAME
@@ -292,8 +292,11 @@ field of
struct passed in as parameter, and the length would include
the terminating nul character.
If there is not enough space to hold the interface length,
-no copy would be done and an
-error would be returned.
+no copy would be done and the
+.Va buffer
+field of
+.Va ifru_buffer
+would be set to NULL.
The kernel will store the buffer length in the
.Va length
field upon return, regardless whether the buffer itself is
OpenPOWER on IntegriCloud