View | Details | Raw Unified | Return to bug 262172 | Differences between
and this patch

Collapse All | Expand All

(-)11.4-my/sys/kern/uipc_usrreq.c (-2 / +11 lines)
Lines 160-165 Link Here
160
static u_long	unpdg_recvspace = 4*1024;
160
static u_long	unpdg_recvspace = 4*1024;
161
static u_long	unpsp_sendspace = PIPSIZ;	/* really max datagram size */
161
static u_long	unpsp_sendspace = PIPSIZ;	/* really max datagram size */
162
static u_long	unpsp_recvspace = PIPSIZ;
162
static u_long	unpsp_recvspace = PIPSIZ;
163
static int	bind_exist_errext = 0;
163
164
164
static SYSCTL_NODE(_net, PF_LOCAL, local, CTLFLAG_RW, 0, "Local domain");
165
static SYSCTL_NODE(_net, PF_LOCAL, local, CTLFLAG_RW, 0, "Local domain");
165
static SYSCTL_NODE(_net_local, SOCK_STREAM, stream, CTLFLAG_RW, 0,
166
static SYSCTL_NODE(_net_local, SOCK_STREAM, stream, CTLFLAG_RW, 0,
Lines 180-185 Link Here
180
	   &unpsp_sendspace, 0, "Default seqpacket send space.");
181
	   &unpsp_sendspace, 0, "Default seqpacket send space.");
181
SYSCTL_ULONG(_net_local_seqpacket, OID_AUTO, recvspace, CTLFLAG_RW,
182
SYSCTL_ULONG(_net_local_seqpacket, OID_AUTO, recvspace, CTLFLAG_RW,
182
	   &unpsp_recvspace, 0, "Default seqpacket receive space.");
183
	   &unpsp_recvspace, 0, "Default seqpacket receive space.");
184
SYSCTL_INT(_net_local, OID_AUTO, bind_exist_errext, CTLFLAG_RW,
185
    &bind_exist_errext, 0,
186
    "bind() will report EEXIST for non-bound-socket existing files.");
183
SYSCTL_INT(_net_local, OID_AUTO, inflight, CTLFLAG_RD, &unp_rights, 0,
187
SYSCTL_INT(_net_local, OID_AUTO, inflight, CTLFLAG_RD, &unp_rights, 0,
184
    "File descriptors in flight.");
188
    "File descriptors in flight.");
185
SYSCTL_INT(_net_local, OID_AUTO, deferred, CTLFLAG_RD,
189
SYSCTL_INT(_net_local, OID_AUTO, deferred, CTLFLAG_RD,
Lines 464-472 Link Here
464
	struct vattr vattr;
468
	struct vattr vattr;
465
	int error, namelen;
469
	int error, namelen;
466
	struct nameidata nd;
470
	struct nameidata nd;
467
	struct unpcb *unp;
471
	struct unpcb *unp, *unp2;
468
	struct vnode *vp;
472
	struct vnode *vp;
469
	struct mount *mp;
473
	struct mount *mp;
470
	cap_rights_t rights;
474
	cap_rights_t rights;
471
	char *buf;
475
	char *buf;
472
476
Lines 522-529 Link Here
522
		else
526
		else
523
			vput(nd.ni_dvp);
527
			vput(nd.ni_dvp);
524
		if (vp != NULL) {
528
		if (vp != NULL) {
529
			if (bind_exist_errext == 1)
530
				VOP_UNP_CONNECT(vp, &unp2);
525
			vrele(vp);
531
			vrele(vp);
526
			error = EADDRINUSE;
532
			if (bind_exist_errext == 1 && unp2 == NULL)
533
				error = EEXIST;
534
			else
535
				error = EADDRINUSE;
527
			goto error;
536
			goto error;
528
		}
537
		}
529
		error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH);
538
		error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH);

Return to bug 262172