Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103533260
D24059.id69488.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
907 B
Referenced Files
None
Subscribers
None
D24059.id69488.diff
View Options
Index: head/lib/libc/sys/sendfile.2
===================================================================
--- head/lib/libc/sys/sendfile.2
+++ head/lib/libc/sys/sendfile.2
@@ -431,3 +431,12 @@
.Er EFAULT ,
if provided an invalid address for
.Fa sbytes .
+The
+.Fn sendfile
+system call does not support SCTP sockets,
+it will return
+.Dv -1
+and set
+.Va errno
+to
+.Er EINVAL.
Index: head/sys/kern/kern_sendfile.c
===================================================================
--- head/sys/kern/kern_sendfile.c
+++ head/sys/kern/kern_sendfile.c
@@ -575,6 +575,12 @@
*so = (*sock_fp)->f_data;
if ((*so)->so_type != SOCK_STREAM)
return (EINVAL);
+ /*
+ * SCTP one-to-one style sockets currently don't work with
+ * sendfile(). So indicate EINVAL for now.
+ */
+ if ((*so)->so_proto->pr_protocol == IPPROTO_SCTP)
+ return (EINVAL);
if (SOLISTENING(*so))
return (ENOTCONN);
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 4:52 AM (16 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14878433
Default Alt Text
D24059.id69488.diff (907 B)
Attached To
Mode
D24059: Disallows SCTP socket for sendfile()
Attached
Detach File
Event Timeline
Log In to Comment