Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109577905
D35294.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
D35294.diff
View Options
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1009,56 +1009,6 @@
unp2 = NULL;
switch (so->so_type) {
- case SOCK_DGRAM:
- {
- const struct sockaddr *from;
-
- if (nam != NULL) {
- error = unp_connect(so, nam, td);
- if (error != 0)
- break;
- }
- UNP_PCB_LOCK(unp);
-
- /*
- * Because connect() and send() are non-atomic in a sendto()
- * with a target address, it's possible that the socket will
- * have disconnected before the send() can run. In that case
- * return the slightly counter-intuitive but otherwise
- * correct error that the socket is not connected.
- */
- unp2 = unp_pcb_lock_peer(unp);
- if (unp2 == NULL) {
- UNP_PCB_UNLOCK(unp);
- error = ENOTCONN;
- break;
- }
-
- if (unp2->unp_flags & UNP_WANTCRED_MASK)
- control = unp_addsockcred(td, control,
- unp2->unp_flags);
- if (unp->unp_addr != NULL)
- from = (struct sockaddr *)unp->unp_addr;
- else
- from = &sun_noname;
- so2 = unp2->unp_socket;
- SOCKBUF_LOCK(&so2->so_rcv);
- if (sbappendaddr_locked(&so2->so_rcv, from, m,
- control)) {
- sorwakeup_locked(so2);
- m = NULL;
- control = NULL;
- } else {
- soroverflow_locked(so2);
- error = (so->so_state & SS_NBIO) ? EAGAIN : ENOBUFS;
- }
- if (nam != NULL)
- unp_disconnect(unp, unp2);
- else
- unp_pcb_unlock_pair(unp, unp2);
- break;
- }
-
case SOCK_SEQPACKET:
case SOCK_STREAM:
if ((so->so_state & SS_ISCONNECTED) == 0) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 7, 11:16 PM (15 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16518087
Default Alt Text
D35294.diff (1 KB)
Attached To
Mode
D35294: unix/dgram: cleanup uipc_send of PF_UNIX/SOCK_DGRAM, step 1
Attached
Detach File
Event Timeline
Log In to Comment