Page MenuHomeFreeBSD

D24059.id69473.diff
No OneTemporary

D24059.id69473.diff

Index: lib/libc/sys/sendfile.2
===================================================================
--- lib/libc/sys/sendfile.2
+++ 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: sys/kern/kern_sendfile.c
===================================================================
--- sys/kern/kern_sendfile.c
+++ 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

Mime Type
text/plain
Expires
Sun, Nov 9, 1:17 PM (13 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25072823
Default Alt Text
D24059.id69473.diff (877 B)

Event Timeline