Description of problem: The man page of connect(2) says that, "EAGAIN No more free local ports or insufficient entries in the routing cache." However, the present system returns "EADDRNOTAVAIL" at the above-mentioned errors. Version-Release number of selected component (if applicable): man-pages-1.67-14 How reproducible: Always Steps to Reproduce: 1. man 2 connect Actual results: Describes EAGAIN Expected results: Should describe EADDRNOTAVAIL Additional info:
Created attachment 264931 [details] Patch to correct man page
test case: 1. compile the sample test program. (please refer attached file: 'sample_test.c') $ gcc -o sample_test tample_test.c 2. change the local port range. $ cat /proc/sys/net/ipv4/ip_local_port_range $ echo "60999 61000" > /proc/sys/net/ipv4/ip_local_port_range 3. run test program $ ./sample_test connect: OK: 0 connect: OK: 1 connect: ERROR: errno=99 'errno=99' means EADDRNOTAVAIL.
Created attachment 323899 [details] test case
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-0023.html
Adam, Upstream here, long after the fact. The current RH patch is below. I am wondering whether to take it upstream. I follow what you've shown in comment 9, but I don't understand the other changes you've made in the patch: * Why drop mention of ip_local_port_range? * How did you arrive at the new text? Thanks, Michael --- man-pages-3.42.orig/man2/connect.2 2012-08-14 00:39:35.000000000 +0200 +++ man-pages-3.42/man2/connect.2 2012-09-18 16:21:40.502613484 +0200 @@ -152,14 +152,8 @@ .I sa_family field. .TP -.B EAGAIN -No more free local ports or insufficient entries in the routing cache. -For -.B AF_INET -see the description of -.I /proc/sys/net/ipv4/ip_local_port_range -.BR ip (7) -for information on how to increase the number of local ports. +.B EADDRNOTAVAIL +Non-existent interface was requested or the requested address was not local. .TP .B EALREADY The socket is nonblocking and a previous connection attempt has not yet