]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't trash the Notification code
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 4 May 2021 18:27:21 +0000 (13:27 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 4 May 2021 18:27:21 +0000 (13:27 -0500)
src/lib/eap_aka_sim/state_machine.c

index de017aacb67a5bc862e242786ff7bb52c2bad196..d07216f3aabb63ac52a3ab261b6afb0a12005739 100644 (file)
@@ -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.