Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Oct 2004 12:51:09 -0700
From:      "Ronald F. Guilmette" <rfg@monkeys.com>
To:        freebsd-net@freebsd.org
Subject:   Strange result (EPERM) from a call to connect(2)
Message-ID:  <89563.1098993069@monkeys.com>

next in thread | raw e-mail | index | archive | help

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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?89563.1098993069>