autofs/autofs-5.0.3-check-replicated-list-after-probe.patch
Ian Kent 3685ec8873 - add upstream bug fix patches
- add command line option to override is running check.
- don't use proc fs for is running check.
- fix fail on included browse map not found.
- fix incorrect multi source messages.
- clear stale flag on map read.
- fix proximity other rpc ping timeout.
- refactor mount request vars code.
- make handle_mounts startup condition distinct.
- fix submount shutdown handling.
- try not to block on expire.
- add configuration paramter UMOUNT_WAIT.
- fix multi mount race.
- fix nfs4 colon escape handling.
- check replicated list after probe.
- add replicated server selection debug logging.
- update replicated server selection documentation.
- use /dev/urandom instead of /dev/random.
- check for mtab pointing to /proc/mounts.
- fix interface config buffer size.
- fix percent hack heap corruption.
2008-08-25 04:47:37 +00:00

34 lines
903 B
Diff

autofs-5.0.3 - check replicated list after probe
From: Ian Kent <raven@themaw.net>
When checking a list of servers for proximity and NFS version
the list may become empty after after the initial probe. This
case isn't handled and this patch adds it.
---
modules/replicated.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/modules/replicated.c b/modules/replicated.c
index 925f641..271907c 100644
--- a/modules/replicated.c
+++ b/modules/replicated.c
@@ -768,6 +768,15 @@ int prune_host_list(unsigned logopt, struct host **list,
this = next;
}
+ /*
+ * The list of hosts that aren't proximity local may now
+ * be empty if we haven't been able probe any so we need
+ * to check again for a list containing only proximity
+ * local hosts.
+ */
+ if (!first)
+ return 1;
+
last = this;
/* Select NFS version of highest number of closest servers */