瀏覽代碼

totemconfig: add nodeid check for knet

Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Bin Liu 8 年之前
父節點
當前提交
99567f0e65
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      exec/totemconfig.c

+ 4 - 0
exec/totemconfig.c

@@ -1412,6 +1412,10 @@ extern int totem_config_read (
 			if (icmap_get_uint32(tmp_key, &totem_config->node_id) == CS_OK && nodeid_set) {
 				*warnings |= TOTEM_CONFIG_WARNING_TOTEM_NODEID_IGNORED;
 			}
+			if ((totem_config->transport_number == TOTEM_TRANSPORT_KNET) && (!totem_config->node_id)) {
+				*error_string = "With knet, you must specify nodeid for current node";
+				return -1;
+			}
 
 			/*
 			 * Make localnode ring0_addr read only, so we can be sure that local