/*
- * The fr_pair_list_move() function in src/lib/valuepair.c does all sorts of
+ * The fr_pair_list_move() function in src/lib/pair.c does all sorts of
* extra magic that we don't want here.
*
* FIXME: integrate this with the code calling it, so that we
int modcall_fixup_update(vp_map_t *map, UNUSED void *ctx)
{
CONF_PAIR *cp = cf_item_to_pair(map->ci);
-
/*
* Anal-retentive checks.
*/
}
/*
- * Only += and :=, and !* operators are supported
+ * Only += and :=, and !*, and ^= operators are supported
* for lists.
*/
switch (map->op) {
}
break;
+ case T_OP_PREPEND:
+ if ((map->rhs->type != TMPL_TYPE_LIST) &&
+ (map->rhs->type != TMPL_TYPE_EXEC)) {
+ cf_log_err(map->ci, "Invalid source for list assignment '%s ^= ...'", map->lhs->name);
+ return -1;
+ }
+ break;
+
default:
cf_log_err(map->ci, "Operator \"%s\" not allowed for list assignment",
fr_int2str(fr_tokens, map->op, "<INVALID>"));