]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix RPZ stats RPZ_NO_OVERRIDE_ACTION check
authorRalph Dolmans <ralph@nlnetlabs.nl>
Thu, 30 Jan 2020 13:05:56 +0000 (14:05 +0100)
committerRalph Dolmans <ralph@nlnetlabs.nl>
Thu, 30 Jan 2020 13:05:56 +0000 (14:05 +0100)
daemon/remote.c
smallapp/unbound-control.c

index 6fc152858fac06c5d56c1d6dca61464ce19843dd..68186937a24cb86f3a9af3f372a254729cc11883 100644 (file)
@@ -1048,7 +1048,7 @@ print_ext(RES* ssl, struct ub_stats_info* s)
                (unsigned)s->svr.key_cache_count)) return 0;
        /* applied RPZ actions */
        for(i=0; i<UB_STATS_RPZ_ACTION_NUM; i++) {
-               if((enum rpz_action)s->svr.rpz_action[i] == RPZ_NO_OVERRIDE_ACTION)
+               if(i == RPZ_NO_OVERRIDE_ACTION)
                        continue;
                if(inhibit_zero && s->svr.rpz_action[i] == 0)
                        continue;
index f97aa393f898b68d816f3c65e17f2ef3bf79ec77..c6263c82435312071d7011b2183de950429c77fa 100644 (file)
@@ -375,7 +375,7 @@ static void print_extended(struct ub_stats_info* s)
        PR_UL("key.cache.count", s->svr.key_cache_count);
        /* applied RPZ actions */
        for(i=0; i<UB_STATS_RPZ_ACTION_NUM; i++) {
-               if((enum rpz_action)s->svr.rpz_action[i] == RPZ_NO_OVERRIDE_ACTION)
+               if(i == RPZ_NO_OVERRIDE_ACTION)
                        continue;
                if(inhibit_zero && s->svr.rpz_action[i] == 0)
                        continue;