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

Fix size of attribute type and vendor IDs #88

Merged
merged 2 commits into from
Sep 26, 2018
Merged

Fix size of attribute type and vendor IDs #88

merged 2 commits into from
Sep 26, 2018

Conversation

mcpat
Copy link
Contributor

@mcpat mcpat commented Sep 25, 2018

This commit fixes the representation of attribute type and vendor ID.
According to RFC 2865 attribute type is one octet and vendor ID is
three octets. So now, the combination of both is calculated as follows:

combined = (vendor_id << 8) | attribute_type

This commit resolves #72

@alandekok
Copy link
Member

The tests fail, so those have to be fixed before the patch is added.

@mcpat
Copy link
Contributor Author

mcpat commented Sep 25, 2018

Sure, as soon as somebody tells me how the tests are built and executed I can have a look into it.

@mcpat
Copy link
Contributor Author

mcpat commented Sep 25, 2018

Oh I see now. The problem is, that the example dictionary file contains non-protocol attributes that "are used internally by the server". As this is the client side I will just remove them from the dictionary.

This commit fixes the representation of attribute type and vendor ID.
According to RFC 2865 attribute type is one octet and vendor ID is
three octets. So now, the combination of both is calculated as follows:

    combined = (vendor_id << 8) | attribute_type

This commit resolves #72

Signed-off-by: Marcel Patzlaff <m.patzlaff@pilz.de>
Signed-off-by: Marcel Patzlaff <m.patzlaff@pilz.de>
@alandekok alandekok merged commit 27b22e4 into FreeRADIUS:master Sep 26, 2018
@mcpat mcpat deleted the issue-72 branch September 27, 2018 06:31
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 this pull request may close these issues.

Collisions in attribute type/vendor conversion
2 participants