Skip to content

Conversation

@robinvdvleuten
Copy link

Hi there!

I've added a method for dumping the DNS answers to binaries with corresponding tests. I have used the responses from the ParserTest class to make sure that it's fully compatible.

The only fail is the last test:

React\Tests\Dns\Protocol\BinaryDumperTest::testResponseWithTwoAnswersToBinary
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-bc 73 81 80 00 01 00 02 00 00 00 00 02 69 6f 0d 77 68 6f 69 73 2d 73 65 72 76 65 72 73 03 6e 65 74 00 00 01 00 01 c0 0c 00 05 00 01 00 00 00 29 00 0e 05 77 68 6f 69 73 03 6e 69 63 02 69 6f 00 c0 32 00 01 00 01 00 00 0d f7 00 04 c1 df 4e 98
+bc 73 81 80 00 01 00 02 00 00 00 00 02 69 6f 0d 77 68 6f 69 73 2d 73 65 72 76 65 72 73 03 6e 65 74 00 00 01 00 01 c0 0c 00 05 00 01 00 00 00 29 00 0e 05 77 68 6f 69 73 03 6e 69 63 02 69 6f 00 c0 0c 00 01 00 01 00 00 0d f7 00 04 c1 df 4e 98

/Users/robinvdvleuten/Projects/react/tests/Dns/Protocol/BinaryDumperTest.php:192

As you can see they are both identical except for the end part:

c0 32 00 01 00 01 00 00 0d f7 00 04 c1 df 4e 98
c0 0c 00 01 00 01 00 00 0d f7 00 04 c1 df 4e 98

My guess is that it has something to do with $packetIndex = 12. But I am not that much of a binary expert so hopefully you guys are willing to help me there :)

@cboden cboden added the dns label Feb 13, 2014
@cboden cboden added this to the v0.4.1 milestone Feb 13, 2014
@robinvdvleuten
Copy link
Author

Have you had any time to look at it @igorw?

@cboden cboden modified the milestones: v0.4.2, v0.4.1 Apr 13, 2014
@clue
Copy link
Member

clue commented Apr 14, 2014

Any update on the failing unit test?

@robinvdvleuten
Copy link
Author

No not yet. I am very clueless about why the response parsing is failing. Do you have any suggestions maybe?

@attozk
Copy link

attozk commented Oct 12, 2014

@robinvdvleuten per email conversation I have included your work in reactphp/dns#8 (in particular this attozk/reactphp-dns@3bb3b5a#diff-7)

@clue
Copy link
Member

clue commented Sep 20, 2015

This PR seems like a good starting point, thanks @cboden!

This PR has been WIP for quite some time now and things have changed considerably since then :-)

React now consists of individual components that are maintained individually. Supporting this is now related to the react/dns component.

Afaict @attozk already started porting this to reactphp/dns#8, so I suppose it makes sense to focus our SSL/TLS related efforts on this component.

@clue clue closed this Sep 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants