[PATCH 1/2] Make local_node ring0 address read-only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx>
---
 exec/totemconfig.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/exec/totemconfig.c b/exec/totemconfig.c
index c6df738..f56f035 100644
--- a/exec/totemconfig.c
+++ b/exec/totemconfig.c
@@ -535,6 +535,15 @@ extern int totem_config_read (
 
 			snprintf(tmp_key, ICMAP_KEYNAME_MAXLEN, "nodelist.node.%u.nodeid", local_node_pos);
 			icmap_get_uint32(tmp_key, &totem_config->node_id);
+
+			/*
+			 * Make localnode ring0_addr read only, so we can be sure that local
+			 * node never changes. If rebinding to other IP would be in future
+			 * supported, this must be changed and handled properly!
+			 */
+			snprintf(tmp_key, ICMAP_KEYNAME_MAXLEN, "nodelist.node.%u.ring0_addr", local_node_pos);
+			icmap_set_ro_access(tmp_key, 0, 1);
+			icmap_set_ro_access("nodelist.local_node_pos", 0, 1);
 		}
 
 		put_nodelist_members_to_config(totem_config);
-- 
1.7.1

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux