1 diff --git a/CHANGELOG b/CHANGELOG
2 index 678e764..aa5d1c1 100644
6 - fix wait time resolution in alarm and state queue handlers.
7 - fix handling of quoted slash alone.
8 - fix parse confusion between attribute and attribute value.
9 +- fix version passed to get_supported_ver_and_cost.
11 18/06/2007 autofs-5.0.2
12 -----------------------
13 diff --git a/modules/replicated.c b/modules/replicated.c
14 index de1b40c..0764d4a 100644
15 --- a/modules/replicated.c
16 +++ b/modules/replicated.c
17 @@ -607,12 +607,31 @@ static int get_supported_ver_and_cost(struct host *host, unsigned int version, c
19 parms.pm_prog = NFS_PROGRAM;
22 + * The version passed in is the version as defined in
23 + * include/replicated.h. However, the version we want to send
24 + * off to the rpc calls should match the program version of NFS.
25 + * So, we do the conversion here.
27 if (version & UDP_SELECTED_MASK) {
29 - vers = (version << 8);
37 + case NFS2_SUPPORTED:
38 + vers = NFS2_VERSION;
40 + case NFS3_SUPPORTED:
41 + vers = NFS3_VERSION;
43 + case NFS4_SUPPORTED:
44 + vers = NFS4_VERSION;
47 + crit(LOGOPT_ANY, "called with invalid version: 0x%x\n", version);
51 rpc_info.proto = getprotobyname(proto);