From 62674aaff8e7972bf050c56c77f518d27f606aee Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Fri, 12 Mar 2021 13:13:17 +0100 Subject: [PATCH] - rpz triggers, fix to put braces around operator. --- doc/unbound.conf.5.in | 2 +- services/localzone.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/unbound.conf.5.in b/doc/unbound.conf.5.in index 95f0c0038..d98514af5 100644 --- a/doc/unbound.conf.5.in +++ b/doc/unbound.conf.5.in @@ -2411,7 +2411,7 @@ The triggers are encoded in the name on the left netblock.rpz-nsip nameserver IP address .fi The netblock is written as .. -For IPv6 use 'zz' for '::'. Specify indiviual addresses with scope length +For IPv6 use 'zz' for '::'. Specify individual addresses with scope length of 32 or 128. For example, 24.10.100.51.198.rpz-ip is 198.51.100.10/24 and 32.10.zz.db8.2001.rpz-ip is 2001:db8:0:0:0:0:0:10/32. .P diff --git a/services/localzone.c b/services/localzone.c index fa586ef38..a24137eac 100644 --- a/services/localzone.c +++ b/services/localzone.c @@ -1604,7 +1604,7 @@ local_zones_zone_answer(struct local_zone* z, struct module_env* env, lz_type == local_zone_always_nodata || lz_type == local_zone_truncate)? LDNS_RCODE_NOERROR:LDNS_RCODE_NXDOMAIN; - rcode = lz_type == local_zone_truncate ? (rcode|BIT_TC) : rcode; + rcode = (lz_type == local_zone_truncate ? (rcode|BIT_TC) : rcode); if(z != NULL && z->soa && z->soa_negative) return local_encode(qinfo, env, edns, repinfo, buf, temp, z->soa_negative, 0, rcode); -- 2.47.3