print warning to console if TUN interface couldn't be setup

master
Andre Puschmann 5 years ago
parent 0aff9d9d26
commit ae4cfb50f2

@ -306,6 +306,8 @@ private:
srslte::proc_manager_list_t callbacks;
srslte::proc_t<plmn_search_proc> plmn_searcher;
srslte::proc_t<rrc_connect_proc> rrc_connector;
const std::string gw_setup_failure_str = "Failed to setup/configure GW interface";
};
} // namespace srsue

@ -958,7 +958,8 @@ void nas::parse_attach_accept(uint32_t lcid, unique_byte_buffer_t pdu)
ip_addr,
nullptr,
err_str)) {
nas_log->error("Failed to set gateway address - %s\n", err_str);
nas_log->error("%s - %s\n", gw_setup_failure_str.c_str(), err_str);
nas_log->console("%s\n", gw_setup_failure_str.c_str());
}
} else if (LIBLTE_MME_PDN_TYPE_IPV6 == act_def_eps_bearer_context_req.pdn_addr.pdn_type) {
memcpy(ipv6_if_id, act_def_eps_bearer_context_req.pdn_addr.addr, 8);
@ -989,7 +990,8 @@ void nas::parse_attach_accept(uint32_t lcid, unique_byte_buffer_t pdu)
0,
ipv6_if_id,
err_str)) {
nas_log->error("Failed to set gateway address - %s\n", err_str);
nas_log->error("%s - %s\n", gw_setup_failure_str.c_str(), err_str);
nas_log->console("%s\n", gw_setup_failure_str.c_str());
}
} else if (LIBLTE_MME_PDN_TYPE_IPV4V6 == act_def_eps_bearer_context_req.pdn_addr.pdn_type) {
memcpy(ipv6_if_id, act_def_eps_bearer_context_req.pdn_addr.addr, 8);
@ -1038,7 +1040,8 @@ void nas::parse_attach_accept(uint32_t lcid, unique_byte_buffer_t pdu)
ip_addr,
ipv6_if_id,
err_str)) {
nas_log->error("Failed to set gateway address - %s\n", err_str);
nas_log->error("%s - %s\n", gw_setup_failure_str.c_str(), err_str);
nas_log->console("%s\n", gw_setup_failure_str.c_str());
}
} else {
nas_log->error("PDN type not IPv4, IPv6 nor IPv4v6\n");

Loading…
Cancel
Save