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

Dictionary inherits #214

Open
georgeyanev opened this issue Dec 13, 2023 · 3 comments
Open

Dictionary inherits #214

georgeyanev opened this issue Dec 13, 2023 · 3 comments

Comments

@georgeyanev
Copy link

In diameter_3gpp_ts32_299_ro.dia you have @inherits diameter_rfc7155_nasreq
And in diameter_3gpp_ts29_212.dia which is also inherited by diameter_3gpp_ts32_299_ro.dia you have
@inherits diameter_rfc4005_nasreq.

Wouldn't these two versions of the nasreq application participating in the same final dictionary cause a potential conflict?

@vkatsuba
Copy link
Contributor

The @inherits directive in Diameter dictionary files is used to indicate that the new dictionary file inherits definitions from another dictionary file. In the case you've described, there seems to be a potential conflict if both diameter_3gpp_ts32_299_ro.dia and diameter_3gpp_ts29_212.dia inherit different versions of the same application.

This scenario may lead to conflicts if there are conflicting definitions or changes in the inherited dictionaries. However, the exact impact depends on the specifics of the Erlang Diameter application and how it is implemented in the Diameter stack you are using.

Also, please notes that diameter_3gpp_ts29_212 is used at ergw_aaa_gx.erl and diameter_3gpp_ts32_299_ro at ergw_aaa_ro.erl - all behaviors are covered by common tests as well and similar issue which was described has not appeared before.

@georgeyanev
Copy link
Author

Yes, I think the condition you describe here is met because both diameter_3gpp_ts32_299_ro.dia and diameter_3gpp_ts29_212.dia inherit different versions of the nasreq application. And as I found out both nasreq versions are quite different.
Should these dictionaries be fixed in a way that for example diameter_3gpp_ts32_299_ro.dia does not happen to inherit more than one version of nasreq transitively ?(or any other app which happen to have multiple versions)?
Actually I'm playing with go-diameter stack and since your dictionaries seemed quite complete I was trying to convert some of them to the xml format required by go-diameter.

@RoadRunnr
Copy link
Member

RoadRunnr commented Dec 13, 2023

inheritance in the Erlang Diameter application is not true OOP style inheritance. It imports only the AVPs and later AVP declarations will override ones that where encountered earlier.

When you are looking for XML Diameter dictionaries, then checkout wireshark. All dictionaries in there are in XML.

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

No branches or pull requests

3 participants