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

Collapse All | Expand All

(-)13-my/sys/kern/uipc_usrreq.c (-2 / +11 lines)
Lines 160-165 Link Here
160
static u_long	unpdg_recvspace = 16*1024;	/* support 8KB syslog msgs */
160
static u_long	unpdg_recvspace = 16*1024;	/* support 8KB syslog msgs */
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 | CTLFLAG_MPSAFE, 0,
165
static SYSCTL_NODE(_net, PF_LOCAL, local, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
165
    "Local domain");
166
    "Local domain");
Lines 185-190 Link Here
185
	   &unpsp_sendspace, 0, "Default seqpacket send space.");
186
	   &unpsp_sendspace, 0, "Default seqpacket send space.");
186
SYSCTL_ULONG(_net_local_seqpacket, OID_AUTO, recvspace, CTLFLAG_RW,
187
SYSCTL_ULONG(_net_local_seqpacket, OID_AUTO, recvspace, CTLFLAG_RW,
187
	   &unpsp_recvspace, 0, "Default seqpacket receive space.");
188
	   &unpsp_recvspace, 0, "Default seqpacket receive space.");
189
SYSCTL_INT(_net_local, OID_AUTO, bind_exist_errext, CTLFLAG_RW,
190
    &bind_exist_errext, 0,
191
    "bind() will report EEXIST for non-bound-socket existing files.");
188
SYSCTL_INT(_net_local, OID_AUTO, inflight, CTLFLAG_RD, &unp_rights, 0,
192
SYSCTL_INT(_net_local, OID_AUTO, inflight, CTLFLAG_RD, &unp_rights, 0,
189
    "File descriptors in flight.");
193
    "File descriptors in flight.");
190
SYSCTL_INT(_net_local, OID_AUTO, deferred, CTLFLAG_RD,
194
SYSCTL_INT(_net_local, OID_AUTO, deferred, CTLFLAG_RD,
Lines 591-599 Link Here
591
	struct vattr vattr;
595
	struct vattr vattr;
592
	int error, namelen;
596
	int error, namelen;
593
	struct nameidata nd;
597
	struct nameidata nd;
594
	struct unpcb *unp;
598
	struct unpcb *unp, *unp2;
595
	struct vnode *vp;
599
	struct vnode *vp;
596
	struct mount *mp;
600
	struct mount *mp;
597
	cap_rights_t rights;
601
	cap_rights_t rights;
598
	char *buf;
602
	char *buf;
599
603
Lines 650-657 Link Here
650
		else
654
		else
651
			vput(nd.ni_dvp);
655
			vput(nd.ni_dvp);
652
		if (vp != NULL) {
656
		if (vp != NULL) {
657
			if (bind_exist_errext == 1)
658
				VOP_UNP_CONNECT(vp, &unp2);
653
			vrele(vp);
659
			vrele(vp);
654
			error = EADDRINUSE;
660
			if (bind_exist_errext == 1 && unp2 == NULL)
661
				error = EEXIST;
662
			else
663
				error = EADDRINUSE;
655
			goto error;
664
			goto error;
656
		}
665
		}
657
		error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH);
666
		error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH);

Return to bug 262172