From ca5c92c862682e7cff82005c61f7f5130fc7399f Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 17 Jul 2006 20:59:48 +0000 Subject: [PATCH] Branch b1_5 b=5585 Disallow loopback address in mkfs.lustre --- lustre/utils/mkfs_lustre.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index fbff71d..3babc75 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -918,6 +918,17 @@ static char *convert_hostnames(char *s1) free(converted); return NULL; } + + if (strncmp(libcfs_nid2str(nid), "127.0.0.1", + strlen("127.0.0.1")) == 0) { + fprintf(stderr, "%s: The NID '%s' resolves to the " + "loopback address '%s'. Lustre requires a " + "non-loopback address.\n", + progname, s2, libcfs_nid2str(nid)); + free(converted); + return NULL; + } + c += snprintf(c, left, "%s,", libcfs_nid2str(nid)); left = converted + MAXNIDSTR - c; } -- 1.8.3.1