Skip to content

Commit

Permalink
pdnsutil {add-record,delete-rrset}: Don't append ZONE if NAME ends wi…
Browse files Browse the repository at this point in the history
…th .

If a NAME ends with a . it is to be understood as an absolute name and
appending the zone is not intuitive then.

Closes: #8595
  • Loading branch information
ukleinek committed Dec 18, 2024
1 parent fe75d35 commit ae6d458
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pdns/pdnsutil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,8 @@ static int addOrReplaceRecord(bool addOrReplace, const vector<string>& cmds) {
DNSName name;
if (cmds.at(2) == "@")
name=zone;
else if (isCanonical(cmds.at(2)))
name = DNSName(cmds.at(2));
else
name = DNSName(cmds.at(2)) + zone;

Expand Down Expand Up @@ -1737,6 +1739,8 @@ static int deleteRRSet(const std::string& zone_, const std::string& name_, const
DNSName name;
if(name_=="@")
name=zone;
else if (isCanonical(name_))
name = DNSName(name_);
else
name=DNSName(name_)+zone;

Expand Down

0 comments on commit ae6d458

Please sign in to comment.