Check tag values, too.
authorAlan T. DeKok <aland@freeradius.org>
Mon, 15 Dec 2008 10:35:32 +0000 (11:35 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 15 Dec 2008 10:35:32 +0000 (11:35 +0100)
When comparing attributes, both tag AND value have to match
for the attributes to compare as equal.

Closes Coverity #59

src/main/valuepair.c

index 1482238..d6b2382 100644 (file)
@@ -181,7 +181,7 @@ int radius_compare_vps(REQUEST *request, VALUE_PAIR *check, VALUE_PAIR *vp)
         *      Tagged attributes are equal if and only if both the
         *      tag AND value match.
         */
-       if ((ret == 0) && check->flags.has_tag) {
+       if (check->flags.has_tag) {
                ret = ((int) vp->flags.tag) - ((int) check->flags.tag);
                if (ret != 0) return ret;
        }