]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix a bug in configure_catz_zone()
authorAram Sargsyan <aram@isc.org>
Tue, 26 Aug 2025 14:58:32 +0000 (14:58 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Wed, 27 Aug 2025 15:01:02 +0000 (15:01 +0000)
commitdb36ae47d2d87bfd38c19d31bbea51c9188b686e
tree30aa6e6b59c0f15b0908a09695308c29a47bb896
parent6a76b143a74d10002549ceab735ae3b035fec163
Fix a bug in configure_catz_zone()

When dns_catz_zone_add() returns ISC_R_EXISTS and there is no
'default-primaries' or 'default-masters', the ISC_R_EXISTS result
code doesn't get reset to ISC_R_SUCCESS, and the function returns
ISC_R_EXISTS instead of ISC_R_SUCCESS. Which means that the zone
is successfully added, but the caller assumes that the function has
failed.

Reset 'result' to ISC_R_SUCCESS when dns_catz_zone_add() returns
ISC_R_EXISTS (it's not an error condition).

Refactor the code go call dns_catz_zone_add() when all other error
conditions are already checked.
bin/named/server.c