From owner-freebsd-net@FreeBSD.ORG Thu Oct 28 19:51:10 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ECF0E16A4CE for ; Thu, 28 Oct 2004 19:51:10 +0000 (GMT) Received: from segfault-outgoing-helo.monkeys.com (segfault.monkeys.com [66.60.159.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F64F43D39 for ; Thu, 28 Oct 2004 19:51:10 +0000 (GMT) (envelope-from rfg@monkeys.com) Received: from segfault-nmh-helo.monkeys.com (localhost [127.0.0.1]) by segfault.monkeys.com (Postfix) with ESMTP id CEDCF54A8 for ; Thu, 28 Oct 2004 12:51:09 -0700 (PDT) To: freebsd-net@freebsd.org Date: Thu, 28 Oct 2004 12:51:09 -0700 Message-ID: <89563.1098993069@monkeys.com> From: "Ronald F. Guilmette" Subject: Strange result (EPERM) from a call to connect(2) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2004 19:51:11 -0000 I am testing a program that I am developing that makes quite a lot of simultaneous outbound TCP connections. While performing the testing, one of the calls to connect(2) within the program returned a -1 (error) result, and when the errno value was then checked, it had a value of EPERM. This is very unexpected and highly disconcerting. In the man page for connect(2) on the system I am using (4.10-RELEASE) there is no mention of the possibility of EPERM being a type of result that one might expect from a failed call to connect(2). So anyway, my questions: What conditions may cause connect(2) to yield EPERM on 4.10-RELEASE? What, if anything, can be done to mitigate or eliminate such error conditions? If there some sysctl variable or some kernel build-time variable that I could adjust that might possible eliminate this error, or at least cause it to be less common in practice?