tjfontaine / native-dns-packet

DNS parsing and writing in javascript
MIT License
58 stars 36 forks source link

Fix & improve OPT/EDNS #11

Closed taoeffect closed 10 years ago

taoeffect commented 10 years ago

See #10 and this comment there.

Besides EDNS/OPT being poorly handled ATM, the data is serialized inefficiently:

    for (pos = 0; pos < val.data.length; pos++) {
      buff.writeUInt8(val.data.readUInt8(pos));
    }

It should call Buffer.copy instead.