1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-03 17:11:32 +00:00
Rick Macklem 6924e68e11 Fix the nfs related daemons so that they don't intermittently
fail with "bind: address already in use". This problem was reported
to the freebsd-stable@ mailing list on Feb. 19 under the subject
heading "statd/lockd startup failure" by george+freebsd at m5p dot com.
The problem is that the first combination of {udp,tcp X ipv4,ipv6}
would select a port# dynamically, but one of the other three combinations
would have that port# already in use. The patch is somewhat involved
because it was requested by dougb@ that the four combinations use the
same port# wherever possible. The patch splits the create_service()
function into two functions. The first goes as far as bind(2) in a
loop for up to GETPORT_MAXTRY - 1 times, attempting to use the same port#
for all four cases. If these attempts fail, the last attempt allows
the 4 cases to use different port #s. After this function has succeeded,
the second function, called complete_service(), does the rest of what
create_service() did.
The three daemons mountd, rpc.lockd and rpc.statd all have a
create_service() function that is patched in a similar way. However,
create_service() has non-trivial differences for the three daemons
that made it impractical to share the same functions between them.

Reviewed by:	jhb
MFC after:	2 weeks
2011-06-02 20:15:32 +00:00
..
2010-12-06 10:24:06 +00:00
2010-08-23 22:24:11 +00:00
2010-08-23 22:24:11 +00:00
2010-02-26 09:41:16 +00:00
2011-05-25 14:13:53 +00:00
2010-06-05 08:11:11 +00:00
2010-05-17 11:18:33 +00:00
2011-03-02 00:29:14 +00:00
2010-12-20 08:54:30 +00:00
2011-03-17 22:17:56 +00:00
2010-10-21 12:27:13 +00:00
2010-05-14 01:45:05 +00:00
2010-08-06 14:33:42 +00:00
2010-12-20 09:36:54 +00:00
2010-03-04 13:35:57 +00:00
2010-08-01 09:37:36 +00:00
2010-01-03 15:32:25 +00:00
2010-10-05 06:31:11 +00:00
2011-04-23 05:56:06 +00:00
2010-07-30 11:58:18 +00:00
2011-02-19 11:44:04 +00:00
2010-08-01 09:37:36 +00:00
2011-04-03 22:36:40 +00:00
2011-01-27 14:16:12 +00:00