Skip to content

Commit

Permalink
fixup! pdnsutil {add-record,delete-rrset}: Don't append ZONE if NAME …
Browse files Browse the repository at this point in the history
…ends with . or ZONE
  • Loading branch information
ukleinek committed Jan 13, 2025
1 parent a372dae commit 79bbff4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdns/pdnsutil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,7 @@ static int addOrReplaceRecord(bool addOrReplace, const vector<string>& cmds) {
DNSName name;
if (cmds.at(2) == "@") {
name = zone;
} else if (isCanonical(cmds.at(2)) || boost::ends_with(cmds.at(2), zone)) {
} else if (isCanonical(cmds.at(2)) || boost::ends_with(cmds.at(2), cmds.at(1))) {
name = DNSName(cmds.at(2));
} else {
cerr << "Name " << cmds.at(2) << "' does not fit into zone '" << zone << "'. Interpreting as relative name." << endl;
Expand Down

0 comments on commit 79bbff4

Please sign in to comment.