From: Arran Cudbard-Bell Date: Tue, 4 May 2021 18:27:21 +0000 (-0500) Subject: Don't trash the Notification code X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=73ccfeef8fdaea4f75fe6c38e8e6ba505eaaabae;p=thirdparty%2Ffreeradius-server.git Don't trash the Notification code --- diff --git a/src/lib/eap_aka_sim/state_machine.c b/src/lib/eap_aka_sim/state_machine.c index de017aacb67..d07216f3aab 100644 --- a/src/lib/eap_aka_sim/state_machine.c +++ b/src/lib/eap_aka_sim/state_machine.c @@ -1294,11 +1294,6 @@ RESUME(send_common_failure_notification) SECTION_RCODE_IGNORED; - /* - * Free anything we were going to send out... - */ - fr_pair_list_free(&request->reply_pairs); - /* * Allow the user to specify specific failure notification * types. We assume the user knows what they're doing and @@ -1318,6 +1313,13 @@ RESUME(send_common_failure_notification) */ notification_vp = fr_pair_find_by_da(&request->reply_pairs, attr_eap_aka_sim_notification, 0); + /* + * Keep Notification, but remove everything else... + */ + if (notification_vp) fr_pair_remove(&request->reply_pairs, notification_vp); + fr_pair_list_free(&request->reply_pairs); + if (notification_vp) fr_pair_append(&request->reply_pairs, notification_vp); + /* * Change the failure notification depending where * we are in the eap_aka_state machine.