These Bind and remote backends return true when at least a TSIG key
is returned, as expected by the API and pdnsutil code, but the GSQL
backend returned false if at least a key was returned and true
otherwise. The LMDB backend always returned false.
This caused `pdnsutil b2b-migrate` not to migrate TSIG keys from a
GSQL or LMDB backend, amongst other things.
for (auto iter = txn.begin(); iter != txn.end(); ++iter) {
keys.push_back(*iter);
}
- return false;
+ return !keys.empty();
}
class LMDBFactory : public BackendFactory
throw PDNSException("GSQLBackend unable to retrieve TSIG keys: "+e.txtReason());
}
- return keys.empty();
+ return !keys.empty();
}
bool GSQLBackend::getDomainKeys(const DNSName& name, std::vector<KeyData>& keys)