Skip to content
Snippets Groups Projects
Commit 049c62f2 authored by Tim McMullan's avatar Tim McMullan Committed by Tim Wickberg
Browse files

Add flags to support enabling/disabling IPv4 and IPv6.

Bug 8350
parent 4f1b0a49
No related branches found
No related tags found
No related merge requests found
......@@ -2639,6 +2639,8 @@ typedef struct reservation_name_msg {
#define CTL_CONF_ASRU 0x00000008 /* AllowSpecResourcesUsage */
#define CTL_CONF_PAM 0x00000010 /* UsePam */
#define CTL_CONF_WCKEY 0x00000020 /* TrackWCKey */
#define CTL_CONF_IPV4_ENABLED 0x00000040 /* IPv4 is enabled */
#define CTL_CONF_IPV6_ENABLED 0x00000080 /* IPv6 is enabled */
#define LOG_FMT_ISO8601_MS 0
#define LOG_FMT_ISO8601 1
......
......@@ -3586,6 +3586,20 @@ static int _validate_and_set_defaults(slurm_conf_t *conf,
(void) s_p_get_string(&conf->comm_params, "CommunicationParameters",
hashtbl);
/*
* IPv4 on by default, can be disabled.
* IPv6 off by default, can be turned on.
*/
conf->conf_flags |= CTL_CONF_IPV4_ENABLED;
if (xstrcasestr(slurm_conf.comm_params, "EnableIPv6"))
conf->conf_flags |= CTL_CONF_IPV6_ENABLED;
if (xstrcasestr(slurm_conf.comm_params, "DisableIPv4"))
conf->conf_flags &= ~CTL_CONF_IPV4_ENABLED;
if (!(conf->conf_flags & CTL_CONF_IPV4_ENABLED) &&
!(conf->conf_flags & CTL_CONF_IPV6_ENABLED))
fatal("Both IPv4 and IPv6 support disabled, cannot communicate");
if (!s_p_get_string(&conf->core_spec_plugin, "CoreSpecPlugin",
hashtbl)) {
conf->core_spec_plugin =
......
......@@ -240,6 +240,21 @@ extern int read_slurmdbd_conf(void)
"CommitDelay", tbl);
s_p_get_string(&slurm_conf.comm_params,
"CommunicationParameters", tbl);
/*
* IPv4 on by default, can be disabled.
* IPv6 off by default, can be turned on.
*/
slurm_conf.conf_flags |= CTL_CONF_IPV4_ENABLED;
if (xstrcasestr(slurm_conf.comm_params, "EnableIPv6"))
slurm_conf.conf_flags |= CTL_CONF_IPV6_ENABLED;
if (xstrcasestr(slurm_conf.comm_params, "DisableIPv4"))
slurm_conf.conf_flags &= ~CTL_CONF_IPV4_ENABLED;
if (!(slurm_conf.conf_flags & CTL_CONF_IPV4_ENABLED) &&
!(slurm_conf.conf_flags & CTL_CONF_IPV6_ENABLED))
fatal("Both IPv4 and IPv6 support disabled, cannot communicate");
s_p_get_string(&slurmdbd_conf->dbd_backup,
"DbdBackupHost", tbl);
s_p_get_string(&slurmdbd_conf->dbd_host, "DbdHost", tbl);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment