diff --git a/openair-cn/UTILS/mme_config.c b/openair-cn/UTILS/mme_config.c index 54470f2ba6fa003c2f476b1272ba5ab34843272e..0cb86e41e2f5092a896c7f36cb90d4505a5baa73 100644 --- a/openair-cn/UTILS/mme_config.c +++ b/openair-cn/UTILS/mme_config.c @@ -270,6 +270,15 @@ static int config_parse_file(mme_config_t *mme_config_p) if (astring != NULL) mme_config_p->s6a_config.conf_file = strdup(astring); } + + if( (config_setting_lookup_string( setting, MME_CONFIG_STRING_S6A_HSS_HOSTNAME, (const char **)&astring) )) { + if (astring != NULL) + mme_config_p->s6a_config.hss_host_name = strdup(astring); + else + AssertFatal (1 == 0, + "You have to provide a valid HSS hostname %s=...\n", + MME_CONFIG_STRING_S6A_HSS_HOSTNAME); + } } // SCTP SETTING @@ -494,6 +503,7 @@ static int config_parse_file(mme_config_t *mme_config_p) } } } + return 0; } diff --git a/openair-cn/UTILS/mme_config.h b/openair-cn/UTILS/mme_config.h index b61a87e57a20f76f4fb68a8b1e45952f6f7c56c1..61308e08f79873092f396a6da008ea565563faa6 100644 --- a/openair-cn/UTILS/mme_config.h +++ b/openair-cn/UTILS/mme_config.h @@ -48,6 +48,7 @@ #define MME_CONFIG_STRING_S6A_CONFIG "S6A" #define MME_CONFIG_STRING_S6A_CONF_FILE_PATH "S6A_CONF" +#define MME_CONFIG_STRING_S6A_HSS_HOSTNAME "HSS_HOSTNAME" #define MME_CONFIG_STRING_SCTP_CONFIG "SCTP" #define MME_CONFIG_STRING_SCTP_INSTREAMS "SCTP_INSTREAMS" @@ -97,6 +98,8 @@ #define NAS_CONFIG_SECURITY_ALGORITHMS_EIA6 0b110 #define NAS_CONFIG_SECURITY_ALGORITHMS_EIA7 0b111 + + typedef struct mme_config_s { /* Reader/writer lock for this configuration */ pthread_rwlock_t rw_lock; @@ -155,6 +158,7 @@ typedef struct mme_config_s { } ipv4; struct { char *conf_file; + char *hss_host_name; } s6a_config; struct { uint32_t queue_size; @@ -166,6 +170,8 @@ typedef struct mme_config_s { uint8_t prefered_ciphering_algorithm[8]; } nas_config; + + } mme_config_t; extern mme_config_t mme_config;