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

Handling of Vendor Specific Attributes (VSA) #37

Merged
merged 3 commits into from
Jan 15, 2024
Merged

Conversation

ivanovuri
Copy link
Contributor

Hi,
As I see, there is no built-in functionality to add additional vendor specific attributes.
I create one by myself, so what about to accept this little improvement.
To add new VSA type we can use this example.

use radius::core::vsa::VSA;
use radius::core::rfc2865::add_vsa_attribute;
...
// 4874 - Vendor Juniper ID
// 65 - vsa type
// 5 is tag number. i.e. in the world of Juniper Subscriber Manager router receives ERX-Service-Activate:5
// value is some test string here
let new_vsa = VSA::new(4874, 65, 5, "bar(1000,5441)");
add_vsa_attribute(&mut p, &new_vsa);

New public function to add vendor specific attribute.
New structure representing vendor specific attribute value.
Make new module available to others.
@ivanovuri ivanovuri changed the title Vsa Handling of Vendor Specific Attributes (VSA) Apr 12, 2023
@aiguy110
Copy link

Is there anything preventing this from being merged? Would love an in-library way to handle VSAs more cleanly than AVP::encode_bytes.

@moznion moznion self-requested a review January 4, 2024 00:04
@moznion
Copy link
Owner

moznion commented Jan 15, 2024

@ivanovuri I appreciate your contribution. I'm sorry for late response.
I'll publish new version which includes this change and let you know that once it has finished.

@moznion moznion merged commit b547a5f into moznion:main Jan 15, 2024
@moznion moznion mentioned this pull request Jan 15, 2024
@moznion
Copy link
Owner

moznion commented Jan 15, 2024

@ivanovuri @aiguy110 I published v0.4.0 which includes this change. Thank you for your contribution!

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.

3 participants