hss: Subscribed-Periodic-RAU-TAU-Timer is in Subscriptio-Data

At least in version 11.8.0 Release 11 of 3GPP TS 29.272,
Subscribed-Periodic-RAU-TAU-Timer is only permitted inside
Subscription-Data.  Before this patch, the HSS encodes it outside, i.e.
on the "main" level of the DIAMETER AVP tree.

Related: #238
This commit is contained in:
Harald Welte 2019-07-30 00:34:55 +02:00
parent 7915773900
commit a7e2865ef0
1 changed files with 9 additions and 8 deletions

View File

@ -399,6 +399,15 @@ static int hss_s6a_ulr_cb( struct msg **msg, struct avp *avp,
ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avp_ambr);
ogs_assert(ret == 0);
/* Set the Subscribed RAU TAU Timer */
ret = fd_msg_avp_new(s6a_subscribed_rau_tau_timer, 0, &avp_rau_tau_timer);
ogs_assert(ret == 0);
val.i32 = subscription_data.subscribed_rau_tau_timer * 60; /* seconds */
ret = fd_msg_avp_setvalue(avp_rau_tau_timer, &val);
ogs_assert(ret == 0);
ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avp_rau_tau_timer);
ogs_assert(ret == 0);
if (subscription_data.num_of_pdn) {
/* Set the APN Configuration Profile */
struct avp *apn_configuration_profile;
@ -620,14 +629,6 @@ static int hss_s6a_ulr_cb( struct msg **msg, struct avp *avp,
ogs_assert(ret == 0);
}
ret = fd_msg_avp_new(s6a_subscribed_rau_tau_timer, 0, &avp);
ogs_assert(ret == 0);
val.i32 = subscription_data.subscribed_rau_tau_timer * 60; /* seconds */
ret = fd_msg_avp_setvalue(avp, &val);
ogs_assert(ret == 0);
ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp);
ogs_assert(ret == 0);
/* Set Vendor-Specific-Application-Id AVP */
ret = fd_message_vendor_specific_appid_set(ans, S6A_APPLICATION_ID);
ogs_assert(ret == 0);