Skip to content
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

Collisions in attribute type/vendor conversion #72

Closed
mcpat opened this issue Jul 27, 2016 · 1 comment · Fixed by #88
Closed

Collisions in attribute type/vendor conversion #72

mcpat opened this issue Jul 27, 2016 · 1 comment · Fixed by #88

Comments

@mcpat
Copy link
Contributor

mcpat commented Jul 27, 2016

According to RFC 2865 the attribute type is one octet and the vendor ID is three octets. To combine that together into one 32-bit integer the following may be done:
combined = (vendor_id << 8) | attribute_type

In the code instead, the vendor_id is shifted 16 bits thus dropping one byte which may lead to collisions.

So I propose to change the calculation above as well as to switch to an integer type with at least 32-bits. Also the default dictionary should be stripped of all server-internal attribute specifications, because clients won't see them anyway.

@alandekok
Copy link
Member

We would prefer a patch to a report that it's wrong.

As things go, it's a minor problem. The private enterprise numbers aren't yet at 16 bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants