]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
walk over the list of child xlat nodes, too
authorAlan T. DeKok <aland@freeradius.org>
Fri, 10 Apr 2020 14:30:01 +0000 (10:30 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 10 Apr 2020 14:30:01 +0000 (10:30 -0400)
src/lib/unlang/xlat_eval.c

index 37d77efdb05448d05993a1f7a57db222afa7db0d..78b7b70c9bb78c9c539e01931468634a4827d3c4 100644 (file)
@@ -1853,5 +1853,18 @@ void xlat_eval_free(void)
  */
 bool xlat_async_required(xlat_exp_t const *xlat)
 {
-       return !xlat->async_safe;
+       xlat_exp_t const *node;
+
+       if (xlat->type != XLAT_CHILD) {
+               return !xlat->async_safe;
+       }
+
+       /*
+        *      Set async_safe on the entire list.
+        */
+       for (node = xlat; node != NULL; node = node->next) {
+               if (!node->async_safe) return true;
+       }
+
+       return false;
 }