Add detection for IPv6 addresses in Trace#fromRequest#38
Merged
Kami merged 15 commits intotryfer:masterfrom Apr 13, 2016
Merged
Add detection for IPv6 addresses in Trace#fromRequest#38Kami merged 15 commits intotryfer:masterfrom
Kami merged 15 commits intotryfer:masterfrom
Conversation
…pkin/zipkin/blob/master/zipkin-thrift/src/main/thrift/com/twitter/zipkin/zipkinCore.thrift New fields (Span.debug, Annotation.duration) are optional, all tests still passing
…t on the Trace and being passed down into the child spans as well. Updated existing Trace tests to make sure that the debug property stays undefined when not explicitly set to true
…ild spans. All tests passing again
Fix up the leaked global variables
…uffers. Convert the binary annotation values into strings for test comparisons
|
Is there any recent progress on getting this merged? |
|
Bump. |
Contributor
|
I quickly looked over the changes and they look good to me. Proper review would be better though, but I don't know when I will be able to get to it. Having said that, we are happy to give write access to new people who would like to help and maintain the project. |
| * Returns true if an IP address is v4 dotted decimal | ||
| * @param {String} address | ||
| * @returns {Boolean} | ||
| */ |
Contributor
There was a problem hiding this comment.
Some unit tests for this function would also be good.
Contributor
|
Sorry for the delay. I did a more in-depth review and the changes looked good to me so I went ahead and merged them into master. Sorry for the delay again and thanks a lot for this great PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch is based on the other pull request to not crash on an IPv6 address. With this patch, node-tryfer is now compatible with node 4.x and 5.x. I fixed the linting issues from the previous patch and leverage the node built-in
net.isIPv4function with a fallback to a custom implementation.One additional tweak I added was to check for IPv6 mapped IPv4 addresses and extract the IPv4 address: