diff options
author | simon <simon@FreeBSD.org> | 2007-03-04 12:25:03 +0000 |
---|---|---|
committer | simon <simon@FreeBSD.org> | 2007-03-04 12:25:03 +0000 |
commit | 1a39e1d25c8ae1719332da98e2da9ea3f4f55a55 (patch) | |
tree | 485ea3d0fb950bbfbfc12c3fae6c70e6abff9c0f | |
parent | 39b83fbf36a44f016b84bf4ae6045139e4f03ff1 (diff) | |
download | FreeBSD-src-1a39e1d25c8ae1719332da98e2da9ea3f4f55a55.zip FreeBSD-src-1a39e1d25c8ae1719332da98e2da9ea3f4f55a55.tar.gz |
Disable RPC exponential back-off for FreeBSD.org systems (IE. hidden
behind _FREEFALL_CONFIG). This is done mainly to make NIS even more
resistant to packet loss.
This is not enabled by default for "normal" FreeBSD since it might cause
the server providing the RPC service to be hit heavily with RPC traffic
in case of problems. freefall.FreeBSD.org and hub.FreeBSD.org have been
running with a patch similar to this for a couple of weeks.
MFC after: 1 week
Discussed with: peter
-rw-r--r-- | lib/libc/Makefile | 3 | ||||
-rw-r--r-- | lib/libc/rpc/clnt_dg.c | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 2741113..8a0692b 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -72,6 +72,9 @@ CFLAGS+= -DNO_FLOATING_POINT .if ${MK_NS_CACHING} != "no" CFLAGS+= -DNS_CACHING .endif +.if defined(_FREEFALL_CONFIG) +CFLAGS+=-D_FREEFALL_CONFIG +.endif .if defined(SYMVER_ENABLED) VERSION_DEF=${.CURDIR}/Versions.def diff --git a/lib/libc/rpc/clnt_dg.c b/lib/libc/rpc/clnt_dg.c index 761cc65..27296ab 100644 --- a/lib/libc/rpc/clnt_dg.c +++ b/lib/libc/rpc/clnt_dg.c @@ -63,7 +63,14 @@ __FBSDID("$FreeBSD$"); #include "mt_misc.h" +#ifdef _FREEFALL_CONFIG +/* + * Disable RPC exponential back-off for FreeBSD.org systems. + */ +#define RPC_MAX_BACKOFF 1 /* second */ +#else #define RPC_MAX_BACKOFF 30 /* seconds */ +#endif static struct clnt_ops *clnt_dg_ops(void); |