}
}
- if (d_trc.d_algoName.countLabels())
- {
+ if (d_trc.d_algoName.hasLabels()) {
// TSIG is not OPT, but we count it in optsize anyway
optsize += d_trc.d_algoName.wirelength() + 3 + 1 + 2; // algo + time + fudge + maclen
optsize += EVP_MAX_MD_SIZE + 2 + 2 + 2 + 0; // mac + origid + ercode + otherdatalen + no other data
}
}
- if(d_trc.d_algoName.countLabels())
+ if(d_trc.d_algoName.hasLabels()) {
addTSIG(pw, d_trc, d_tsigkeyname, d_tsigsecret, d_tsigprevious, d_tsigtimersonly);
+ }
d_rawpacket.assign((char*)&packet[0], packet.size()); // XXX we could do this natively on a vector..
r->d_ednsrcode = 0;
r->d_xfr = d_xfr;
- if(d_tsigkeyname.countLabels()) {
+ if(d_tsigkeyname.hasLabels()) {
r->d_tsigkeyname = d_tsigkeyname;
r->d_tsigprevious = d_tsigprevious;
r->d_trc = d_trc;
}
prev=shorter;
}
- if(encloser.countLabels() && nextcloser.countLabels())
+ if(encloser.hasLabels() && nextcloser.hasLabels())
{
if(denied.count(nextcloser))
{
if(mdp.d_header.rcode)
return mdp.d_header.rcode;
- if(origQname.countLabels()) { // not AXFR
+ if(origQname.hasLabels()) { // not AXFR
if(mdp.d_header.id != id)
throw ResolverException("Remote nameserver replied with wrong id");
if(mdp.d_header.qdcount != 1)
std::string stripped=stripDot(content);
std::string rrvalue = stripped + ((stripped.empty() || stripped[stripped.size()-1]==' ') ? "." : "");
std::string dn = "dc=";
- if( host.countLabels() ) { dn += host.toStringNoDot() + ",dc="; }
+ if( host.hasLabels() ) { dn += host.toStringNoDot() + ",dc="; }
dn += g_zonename.toStringNoDot() + "," + g_basedn;
cout << "dn: " << dn << endl;
- if( host.countLabels() == 0 ) { host = g_zonename.operator const DNSName&(); }
+ if( !host.hasLabels() ) { host = g_zonename.operator const DNSName&(); }
if( !g_entries[dn] )
{