Commit d150e59f authored by aligungr's avatar aligungr

Custom GTP IP address configuration for UP Transport Layer Information

parent 0b4389c5
......@@ -52,6 +52,9 @@ static nr::gnb::GnbConfig *ReadConfigYaml()
result->ngapIp = yaml::GetIp4(config, "ngapIp");
result->gtpIp = yaml::GetIp4(config, "gtpIp");
if (yaml::HasField(config, "gtpAdvertiseIp"))
result->gtpAdvertiseIp = yaml::GetIp4(config, "gtpAdvertiseIp");
result->ignoreStreamIds = yaml::GetBool(config, "ignoreStreamIds");
result->pagingDrx = EPagingDrx::V128;
result->name = "UERANSIM-gnb-" + std::to_string(result->plmn.mcc) + "-" + std::to_string(result->plmn.mnc) + "-" +
......
......@@ -233,7 +233,9 @@ std::optional<NgapCause> NgapTask::setupPduSessionResource(PduSessionResource *r
return NgapCause::Protocol_semantic_error;
}
resource->downTunnel.address = utils::IpToOctetString(m_base->config->gtpIp);
std::string gtpIp = m_base->config->gtpAdvertiseIp.value_or(m_base->config->gtpIp);
resource->downTunnel.address = utils::IpToOctetString(gtpIp);
resource->downTunnel.teid = ++m_downlinkTeidCounter;
auto *w = new NmGnbNgapToGtp(NmGnbNgapToGtp::SESSION_CREATE);
......
......@@ -307,6 +307,7 @@ struct GnbConfig
std::string portalIp{};
std::string ngapIp{};
std::string gtpIp{};
std::optional<std::string> gtpAdvertiseIp{};
bool ignoreStreamIds{};
/* Assigned by program */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment