-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: The length of the IP address was not being set. #91
Conversation
added 2 asserts to verify IP address length, 2 concerns:
|
…common-cxx into feature/bug-ip-length
The comment on the IpHeaderParserTests is addressed here: #76 (comment) - they are not needed for now. I now think on what's the semantics of this length field and is it really needed. The comment says that it's the length of the byte array and that's how Max has changed the implementation and tests, but then it is redundant, because you can figure out whether it is 4 or 16 bytes from the type of the IP address.
If it is the number of bytes written - then the comment needs to be changed, and also the question on whether this field is needed at all for clients to consume. |
@drasmart we agreed to remove the length property from common-cxx. Therefore this PR needs to change to do that. |
I actually attempted to do that and removed all length-checking asserts from the tests, but then I discovered that
it looks like the type is set here, but then overwritten by further parsing code... Lines 308 to 322 in 1e435a2
previously when the length field was part of the structure - I guess it was overwritten... so it suggests we have some issue in the parsing code, I can push my commit with this change and test failing.. |
@drasmart to include as part of today's PR and then review with @justadreamer at that time. |
Test run for last commit: |
@drasmart can be merged. |
Tests need to be added to verify the presence of the length member and that its value is correct.