Commit 7ac31d52 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix issue for PAA

parent c7ac1f5d
......@@ -50,21 +50,6 @@ SMF =
# Pool of UE assigned IP addresses
# Do not make IP pools overlap
# first IPv4 address X.Y.Z.1 is reserved for GTP network device on UPF
IP_ADDRESS_POOL :
{
IPV4_LIST = (
{RANGE = "12.1.1.2 - 12.1.1.128";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
{RANGE = "12.1.1.129 - 12.1.1.224";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
{RANGE = "10.10.10.2 - 10.10.10.253";} # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
);
IPV6_LIST = (
{PREFIX = "2001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
{PREFIX = "3001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
{PREFIX = "4001:1:2::/64";} # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
);
};
DNN_LIST = (
# IPV4_POOL, IPV6_POOL are index in IPV4_LIST, IPV6_LIST, PDU_SESSION_TYPE choice in {IPv4, IPv6, IPv4v6}
{DNN_NI = "default"; PDU_SESSION_TYPE = "IPv4"; IPV4_RANGE = "12.1.1.2 - 12.1.1.128"; IPV6_PREFIX = "2001:1:2::/64"},
......
......@@ -93,12 +93,14 @@ int smf_app::apply_config(const smf_config& cfg) {
(it->second.pdu_session_type.pdu_session_type ==
PDU_SESSION_TYPE_E_IPV4V6)) {
int range = be32toh(it->second.ue_pool_range_high.s_addr) -
be32toh(it->second.ue_pool_range_high.s_addr);
be32toh(it->second.ue_pool_range_low.s_addr);
paa_dynamic::get_instance().add_pool(
it->second.dnn, pool_id, it->second.ue_pool_range_low, range);
// TODO: check with dnn_label
Logger::smf_app().info("Applied config %s", it->second.dnn.c_str());
paa.ipv4_address = it->second.ue_pool_range_low;
std::string ipv4_addr(inet_ntoa(paa.ipv4_address));
Logger::smf_app().info("PAA Ipv4 ", ipv4_addr.c_str());
}
if ((it->second.pdu_session_type.pdu_session_type ==
......
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