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

help decoding vendor specific attributes #38

Closed
ralberto opened this issue Oct 11, 2018 · 3 comments
Closed

help decoding vendor specific attributes #38

ralberto opened this issue Oct 11, 2018 · 3 comments
Labels

Comments

@ralberto
Copy link

Hi.
(Sorry if this is not a right place to ask this type of question. I'm also not familiarized with radius protocol)

I'm creating an utility that will receive radius packets (via UDP socket) and decode some A/V pairs to a human readable format. With the help of this project I'm currently able to read the packages and retrieve A/V pairs using rfc2865.<attr_GetString(packet)>.

However, I really need to decode a vendor specific attribute, namely 3GPP User-Location-Info. Can someone point me in the right direction how to do that?

Thanks for any help you could provide.

@ghost ghost added the question label Oct 12, 2018
@ghost
Copy link

ghost commented Oct 12, 2018

You'll want to use radius-dict-gen for this. It takes in a FreeRadius dictionary file and outputs Go helper code for working with those dictionary's attributes on a packet. Once installed, you can run it like this:

radius-dict-gen -output generated.go -package threegpp /usr/share/freeradius/dictionary.3gpp

I just tried running that command on my machine, and I get errors because I have not implemented the "byte" attribute, which that dictionary apparently uses. You can either use the -ignore flag (e.g. -ignore 3GPP-Session-Stop-Indicator) if those particular attributes are of no interest to you, or open another ticket requesting that the byte attribute be supported.

@ralberto
Copy link
Author

Thanks @bontibon.
That's really helpful. I don't need those attributes, however I think the -ignore flag is not being applied during the parse phase. So the parser fails with the error:

... unknown attribute type "byte`

@ralberto
Copy link
Author

As a workaround I just commented those attributes directly on the 3gpp dictionary!

@ghost ghost closed this as completed Oct 12, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant