From 255ae4120b223e0bc39d8da82d969dba81b94033 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 9 Sep 2022 09:11:06 +0200 Subject: [PATCH] Fix CID 1497843: Execution cannot reach this statement Followup to #11143. Not a bug per se, but the unreachable code should be guarded by proper #ifdef --- pdns/tkey.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pdns/tkey.cc b/pdns/tkey.cc index f7f439afa4..7fdd540229 100644 --- a/pdns/tkey.cc +++ b/pdns/tkey.cc @@ -16,7 +16,9 @@ void PacketHandler::tkeyHandler(const DNSPacket& p, std::unique_ptr& TKEYRecordContent tkey_in; std::shared_ptr tkey_out(new TKEYRecordContent()); DNSName name; +#ifdef ENABLE_GSS_TSIG bool sign = false; +#endif if (!p.getTKEYRecord(&tkey_in, &name)) { g_log<& zrr.dr.d_place = DNSResourceRecord::ANSWER; r->addRecord(std::move(zrr)); +#ifdef ENABLE_GSS_TSIG if (sign) { TSIGRecordContent trc; @@ -122,6 +125,7 @@ void PacketHandler::tkeyHandler(const DNSPacket& p, std::unique_ptr& // this should cause it to lookup name context r->setTSIGDetails(trc, name, name.toStringNoDot(), "", false); } +#endif r->commitD(); } -- 2.47.2