]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add prepend handling for whole list copying
authorNick Porter <nick@portercomputing.co.uk>
Fri, 25 Sep 2020 13:47:19 +0000 (14:47 +0100)
committerAlan DeKok <aland@freeradius.org>
Wed, 14 Oct 2020 14:53:37 +0000 (10:53 -0400)
Allows for
    update {
        &reply: ^= &request
    }
which would insert all entry from request at the beginning of reply

src/main/map.c

index 65d314601c572242aa5863b9fd5d3d560ad28e0c..451a58a15c473c3d1db69042a3d8ac6a4bb466b6 100644 (file)
@@ -1177,6 +1177,10 @@ int map_to_request(REQUEST *request, vp_map_t const *map, radius_map_getvalue_t
                                fr_pair_list_free(&head);
                        }
                        goto finish;
+               case T_OP_PREPEND:
+                       fr_pair_list_move(parent, list, &head, T_OP_PREPEND);
+                       fr_pair_list_free(&head);
+                       goto finish;
 
                default:
                        fr_pair_list_free(&head);