aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Ramadan <omar.ramadan93@gmail.com>2019-04-12 09:03:39 -0700
committerOmar Ramadan <omar.ramadan93@gmail.com>2019-04-13 21:55:18 +0000
commite2bd9eb37d8160b436a5a1bffc14690321f40ae6 (patch)
tree06598bce35a77dbcfced9f74020d3ee93f4aa20c
parentc65cfe86967c16a436e128fbfc90ecec55d56d57 (diff)
Allow MME name preformatted as FQDN in SGsAP
-rw-r--r--src/libmsc/sgs_iface.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libmsc/sgs_iface.c b/src/libmsc/sgs_iface.c
index eed107a..8b4b61d 100644
--- a/src/libmsc/sgs_iface.c
+++ b/src/libmsc/sgs_iface.c
@@ -168,6 +168,12 @@ static int decode_mme_name(char *mme_name, const struct tlv_parsed *tp)
if (!mme_name_enc)
return -EINVAL;
+ /* some implementations use FDQN format violating TS 29.118 9.3.14 */
+ if (!osmo_parse_mme_domain(&gummei, (const char *) mme_name_enc)) {
+ memcpy(mme_name, mme_name_enc, TLVP_LEN(tp, SGSAP_IE_MME_NAME));
+ return 0;
+ }
+
/* decode the MME name from DNS labels to string */
osmo_apn_to_str(mme_name, TLVP_VAL(tp, SGSAP_IE_MME_NAME), TLVP_LEN(tp, SGSAP_IE_MME_NAME));