diff --git a/lib/tcpd.js b/lib/tcpd.js index 2c4b4e9..2afa8a5 100644 --- a/lib/tcpd.js +++ b/lib/tcpd.js @@ -27,9 +27,10 @@ module.exports.create = function (cli, dnsd) { // TODO pad two bytes for lengths dnsd.onMessage(nb, function (err, newAb, dbgmsg) { - var lenbuf = Buffer.from([ newAb.length >> 8, newAb.length & 255 ]); // TODO XXX generate legit error packet if (err) { console.error("Error", err); c.end(); return; } + + var lenbuf = Buffer.from([ newAb.length >> 8, newAb.length & 255 ]); console.log('TCP ' + dbgmsg); c.write(lenbuf);