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 gathering of RADIUS Accounting metrics #204

Merged
merged 1 commit into from
Jun 23, 2021
Merged

Conversation

0xAX
Copy link
Member

@0xAX 0xAX commented Jun 23, 2021

We are using ets:match_spec_run/2 to go over given attributes to
match type of RADIUS Accounting request to update a certain metric by
RADIUS Accounting type.

The issue is that we may get RADIUS attributes during sending of a RADIUS
request in two following formats:

  • [{AttrId, Value}, ...]
  • [#attribute{}, ....]

But only the first one could be matched in ets:match_spec_run/2. Thus if
RADIUS attributes will be given in the second format - a RADIUS Accounting
client metric will not be updated.

This commit fixes this situation.

We are using ets:match_spec_run/2 to go over given attributes to
match type of RADIUS Accounting request to update a certain metric by
RADIUS Accounting type.

The issue is that we may get RADIUS attributes during sending of a RADIUS
request in two following formats:

   * [{AttrId, Value}, ...]
   * [#attribute{}, ....]

But only the first one could be matched in ets:match_spec_run/2. Thus if
RADIUS attributes will be given in the second format - a RADIUS Accounting
client metric will not be updated.

This commit fixes this situation.
@0xAX 0xAX requested a review from a team as a code owner June 23, 2021 03:27
@vkatsuba vkatsuba merged commit 7ea33ce into master Jun 23, 2021
@vkatsuba vkatsuba deleted the fix-acct-client-metrics branch June 23, 2021 06:25
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.

2 participants