Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdnsutil {add-record,delete-rrset}: Don't append ZONE if NAME ends with . #14984

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
misc: Use boost::ends_with() in isCanonical instead of open-coding
boost:ends_with(qname, ".") behaves exactly as isCanonical(qname)
should. So use the first to implement the latter.
  • Loading branch information
ukleinek committed Jan 13, 2025
commit 5f8af391b1ba7a49c884a020b525fa5ef8ff6db5
4 changes: 1 addition & 3 deletions pdns/misc.hh
Original file line number Diff line number Diff line change
@@ -469,9 +469,7 @@ pair<string, string> splitField(const string& inp, char sepa);

inline bool isCanonical(const string& qname)
{
if(qname.empty())
return false;
return qname[qname.size()-1]=='.';
return boost::ends_with(qname, ".");
}

inline DNSName toCanonic(const DNSName& zone, const string& qname)
Loading