tjfontaine / native-dns-packet

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

Fix various problems #2

Closed rakoo closed 10 years ago

rakoo commented 10 years ago

Here are a few fixes I could find.

taoeffect commented 10 years ago

This commit makes some significant changes, and I'd love for @tjfontaine to comment on them if he can (it would save me a lot of trouble, trouble that I'm planning on going through if he doesn't comment).

  1. packet.js line 67 end = buff.tell()
  2. Lines 162-163. These either fix a significant bug (malformed packet) or introduce a significant bug (malformed packet).
  3. The additional OPT stuff.

I haven't taken the time to understand these changes yet, but again, will do so, and hope @tjfontaine can comment ASAP.

If all looks OK and @tjfontaine fails to merge these changes in, I will create a fork off of them and use them in DNSChain.

Great work @rakoo! :+1:

taoeffect commented 10 years ago

BTW, lazy question as I'm on the road and internet is painfully slow: what's the best way to test the EDNS to make sure it's working correctly?

rakoo commented 10 years ago

@taoeffect as explained by mail, for EDNS testing you can capture pretty much any packet from a standard DNS server, it will contain EDNS information (it is stored as an OPT packet in the additional section)