Print out TAG_ANY attributes correctly
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 24 Jun 2014 09:15:03 +0000 (10:15 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 24 Jun 2014 09:18:02 +0000 (10:18 +0100)
When attributes are inserted into the lists they should have their tag set to TAG_NONE if their tag was previously TAG_ANY

src/lib/print.c

index a49504f..8880117 100644 (file)
@@ -749,7 +749,7 @@ size_t vp_prints(char *out, size_t outlen, VALUE_PAIR const *vp)
                token = "<INVALID-TOKEN>";
        }
 
-       if (vp->da->flags.has_tag) {
+       if (vp->da->flags.has_tag && (vp->tag != TAG_ANY)) {
                len = snprintf(out, freespace, "%s:%d %s ", vp->da->name, vp->tag, token);
        } else {
                len = snprintf(out, freespace, "%s %s ", vp->da->name, token);