Skip to content

Commit

Permalink
define unknown attributes in existence checks, too. Addresses #1883
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Jan 20, 2017
1 parent 39f1ea7 commit 92dd823
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/main/cond_tokenize.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,9 @@ static ssize_t cond_tokenize(TALLOC_CTX *ctx, CONF_ITEM *ci, char const *start,

rad_assert(c->data.vpt->type != TMPL_TYPE_REGEX);

if (c->data.vpt->type == TMPL_TYPE_ATTR_UNDEFINED) {
c->pass2_fixup = PASS2_FIXUP_ATTR;
if (tmpl_define_unknown_attr(c->data.vpt) < 0) {
p = lhs_p - tlen;
return_P("Failed defining attribute");
}

} else { /* it's an operator */
Expand Down
3 changes: 1 addition & 2 deletions src/tests/keywords/ipaddr.raw
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ update request {
Attr-4 = 0x010203
}

#if (!&Attr-4) {
if (0) {
if (!&Attr-4) {
update reply {
Filter-Id := "Cannot find newly added raw attribute"
}
Expand Down

0 comments on commit 92dd823

Please sign in to comment.