Skip to content

Commit

Permalink
dns: convert plugin output to local types for instanceof checks
Browse files Browse the repository at this point in the history
  • Loading branch information
pinheadmz committed Feb 28, 2021
1 parent ef8be54 commit d687081
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/dns/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,9 @@ class RootServer extends DNSServer {
this.logger.debug(e.stack);
}

if (res)
return res;
if (res) {
return Message.decode(res.encode());
}
}

// Hit the cache first.
Expand Down Expand Up @@ -442,6 +443,11 @@ class RootServer extends DNSServer {
}

signRRSet(rrset, type) {
// Intended to be called by plugin.
// Not all bns `Record` instances are created equal.
rrset = rrset.map((record) => {
return Record.decode(record.encode());
});
// No return value, signature is pushed to rrset.
key.signZSK(rrset, type);
}
Expand Down

0 comments on commit d687081

Please sign in to comment.