Skip to content

Commit

Permalink
Fix !* in update sections for non string attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Sep 2, 2013
1 parent 028edbb commit 985a4dc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/valuepair.c
Expand Up @@ -1130,6 +1130,19 @@ int radius_map2vp(VALUE_PAIR **out, REQUEST *request, value_pair_map_t const *ma

*out = NULL;

/*
* Special case for !*, we don't need to parse the value, just allocate an attribute with
* the right operator.
*/
if (map->op == T_OP_CMP_FALSE) {
vp = pairalloc(request, map->dst->da);
if (!vp) return -1;
vp->op = map->op;
*out = vp;

return 0;
}

/*
* List to list found, this is a special case because we don't need
* to allocate any attributes, just found the current list, and change
Expand Down

0 comments on commit 985a4dc

Please sign in to comment.