summaryrefslogtreecommitdiff
path: root/src/ot_config.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-11-03 06:02:47 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-11-03 06:02:47 +0100
commitf16ea39889c0fd65f3e533cf40cc3a0a33ac1c33 (patch)
treece43369ece6303d35737b95ed203936f1cb2eb73 /src/ot_config.c
parentb142979a036ac53c4e59e1906fed01a76198ba84 (diff)
Let a user pick their cluster's own multicast groupHEADmaster
Diffstat (limited to 'src/ot_config.c')
-rw-r--r--src/ot_config.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ot_config.c b/src/ot_config.c
index 95136b5..4064d1b 100644
--- a/src/ot_config.c
+++ b/src/ot_config.c
@@ -208,6 +208,7 @@ typedef enum {
208 CONFIG_TRACKER_REDIRECT_URL, 208 CONFIG_TRACKER_REDIRECT_URL,
209 CONFIG_LIVESYNC_CLUSTER_NODE_IP, 209 CONFIG_LIVESYNC_CLUSTER_NODE_IP,
210 CONFIG_LIVESYNC_CLUSTER_LISTEN, 210 CONFIG_LIVESYNC_CLUSTER_LISTEN,
211 CONFIG_LIVESYNC_CLUSTER_GROUP,
211} config_kind; 212} config_kind;
212 213
213typedef struct { 214typedef struct {
@@ -247,6 +248,7 @@ static const config_key config_keys[] = {
247#ifdef WANT_SYNC_LIVE 248#ifdef WANT_SYNC_LIVE
248 CONFIG_KEY("livesync.cluster.node_ip", CONFIG_LIVESYNC_CLUSTER_NODE_IP), 249 CONFIG_KEY("livesync.cluster.node_ip", CONFIG_LIVESYNC_CLUSTER_NODE_IP),
249 CONFIG_KEY("livesync.cluster.listen", CONFIG_LIVESYNC_CLUSTER_LISTEN), 250 CONFIG_KEY("livesync.cluster.listen", CONFIG_LIVESYNC_CLUSTER_LISTEN),
251 CONFIG_KEY("livesync.cluster.group", CONFIG_LIVESYNC_CLUSTER_GROUP),
250#endif 252#endif
251}; 253};
252static const size_t config_entry_count = sizeof(config_keys) / sizeof(config_keys[0]); 254static const size_t config_entry_count = sizeof(config_keys) / sizeof(config_keys[0]);
@@ -378,6 +380,10 @@ static int parse_configfile(char *config_filename) {
378 set_config_option(&g_redirecturl, p); 380 set_config_option(&g_redirecturl, p);
379 break; 381 break;
380#ifdef WANT_SYNC_LIVE 382#ifdef WANT_SYNC_LIVE
383 case CONFIG_LIVESYNC_CLUSTER_GROUP:
384 if (!ip_parse(p, tmpip) || livesync_set_group(tmpip) == -1)
385 goto parse_error;
386 break;
381 case CONFIG_LIVESYNC_CLUSTER_NODE_IP: 387 case CONFIG_LIVESYNC_CLUSTER_NODE_IP:
382 if (!scan_ip6_net(p, &tmpnet)) 388 if (!scan_ip6_net(p, &tmpnet))
383 goto parse_error; 389 goto parse_error;