瀏覽代碼

Merge trunk revision 2850:
r2850 | asalkeld | 2010-05-17 17:46:35 -0700 (Mon, 17 May 2010) | 2 lines

cov 10388: fix check for no mcast address



git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2892 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 15 年之前
父節點
當前提交
c8346a5a7c
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      exec/totemconfig.c

+ 6 - 1
exec/totemconfig.c

@@ -421,7 +421,12 @@ int totem_config_validate (
 		/*
 		 * Some error checking of parsed data to make sure its valid
 		 */
-		if ((int *)&totem_config->interfaces[i].mcast_addr.addr == 0) {
+
+		struct totem_ip_address null_addr;
+		memset (&null_addr, 0, sizeof (struct totem_ip_address));
+
+		if (memcmp (&totem_config->interfaces[i].mcast_addr, &null_addr,
+				sizeof (struct totem_ip_address)) == 0) {
 			error_reason = "No multicast address specified";
 			goto parse_error;
 		}