Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F158235223
D49436.id152889.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D49436.id152889.diff
View Options
diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c
--- a/sys/kern/uipc_domain.c
+++ b/sys/kern/uipc_domain.c
@@ -97,6 +97,12 @@
return (EOPNOTSUPP);
}
+static int
+pr_ctloutput_notsupp(struct socket *so, struct sockopt *sopt)
+{
+ return (ENOPROTOOPT);
+}
+
static int
pr_disconnect_notsupp(struct socket *so)
{
@@ -194,6 +200,7 @@
NOTSUPP(pr_connect2);
NOTSUPP(pr_connectat);
NOTSUPP(pr_control);
+ NOTSUPP(pr_ctloutput);
NOTSUPP(pr_disconnect);
NOTSUPP(pr_listen);
NOTSUPP(pr_peeraddr);
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -3804,10 +3804,7 @@
CURVNET_SET(so->so_vnet);
error = 0;
if (sopt->sopt_level != SOL_SOCKET) {
- if (so->so_proto->pr_ctloutput != NULL)
- error = (*so->so_proto->pr_ctloutput)(so, sopt);
- else
- error = ENOPROTOOPT;
+ error = (*so->so_proto->pr_ctloutput)(so, sopt);
} else {
switch (sopt->sopt_name) {
case SO_ACCEPTFILTER:
@@ -4017,7 +4014,7 @@
error = ENOPROTOOPT;
break;
}
- if (error == 0 && so->so_proto->pr_ctloutput != NULL)
+ if (error == 0)
(void)(*so->so_proto->pr_ctloutput)(so, sopt);
}
bad:
@@ -4068,10 +4065,7 @@
CURVNET_SET(so->so_vnet);
error = 0;
if (sopt->sopt_level != SOL_SOCKET) {
- if (so->so_proto->pr_ctloutput != NULL)
- error = (*so->so_proto->pr_ctloutput)(so, sopt);
- else
- error = ENOPROTOOPT;
+ error = (*so->so_proto->pr_ctloutput)(so, sopt);
CURVNET_RESTORE();
return (error);
} else {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, May 31, 4:00 AM (15 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33645246
Default Alt Text
D49436.id152889.diff (1 KB)
Attached To
Mode
D49436: socket: Check for a NULL ctloutput handler in the SO_SETFIB handler
Attached
Detach File
Event Timeline
Log In to Comment