Update to generate SMF Log for Session Removed. (#677)

Create info log to show when the user disconnect the APN, with IMSI, APN and IPv4/IPv6.
This commit is contained in:
R. Medeiros 2020-11-19 18:11:28 -03:00 committed by GitHub
parent dcf0a714aa
commit 3c99af7736
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -1005,10 +1005,19 @@ void smf_sess_remove(smf_sess_t *sess)
int i;
smf_ue_t *smf_ue = NULL;
smf_event_t e;
char buf1[OGS_ADDRSTRLEN];
char buf2[OGS_ADDRSTRLEN];
ogs_assert(sess);
smf_ue = sess->smf_ue;
ogs_assert(smf_ue);
ogs_info("Removed Session: UE IMSI:[%s] APN:[%s] IPv4:[%s] IPv6:[%s]",
smf_ue->imsi_bcd,
sess->pdn.apn,
sess->ipv4 ? OGS_INET_NTOP(&sess->ipv4->addr, buf1) : "",
sess->ipv6 ? OGS_INET6_NTOP(&sess->ipv6->addr, buf2) : "");
ogs_list_remove(&smf_ue->sess_list, sess);