freeradius-server icon indicating copy to clipboard operation
freeradius-server copied to clipboard

amend policy insert_acct_class/acct_unique to work with multiple Class attributes

Open jimdigriz opened this issue 1 year ago • 7 comments

Some deployments may wish to use multiple Class attributes and continue to use FR's existing provided accounting policies.

We also take the opportunity to remove needless hex encoding on the Class attribute due to the string to octet conversion originally in place; halving their length.

jimdigriz avatar Jun 09 '24 16:06 jimdigriz

Never subscribed to your company

On Sun, Jun 9, 2024, 12:00 PM Alexander Clouter @.***> wrote:

Some deployments https://lists.freeradius.org/pipermail/freeradius-users/2017-March/087021.html may wish to use multiple Class attributes and continue to use FR's existing provided accounting policies.

We also take the opportunity to remove needless hex encoding on the Class attribute due to the string to octet conversion originally in place.

You can view, comment on, or merge this pull request online at:

https://github.com/FreeRADIUS/freeradius-server/pull/5337 Commit Summary

File Changes

(1 file https://github.com/FreeRADIUS/freeradius-server/pull/5337/files)

Patch Links:

  • https://github.com/FreeRADIUS/freeradius-server/pull/5337.patch
  • https://github.com/FreeRADIUS/freeradius-server/pull/5337.diff

— Reply to this email directly, view it on GitHub https://github.com/FreeRADIUS/freeradius-server/pull/5337, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJAGGWM77HDG7FQZV2CNKTZGR3ZTAVCNFSM6AAAAABJA7ZUDGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2DEMZVGUYTSMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Gman42412 avatar Jun 09 '24 17:06 Gman42412

My one question is does this change any existing behavior? If so, it would have to be added as a separate policy.

alandekok avatar Jun 11 '24 13:06 alandekok

Only problem I can foresee is when someone updates to this alternative policy and they have existing old hex encoded Class attributes out there in the wild coming in on the Accounting-Request's.

So maybe the 'encoder' is good, but for the 'decoder' we need to check if the preamble is either hex("ai:") or if it is hex(hex("ai:")) to determine what to do with it.

jimdigriz avatar Jun 11 '24 13:06 jimdigriz

Thanks, I'd be happier with being compatible with existing systems. I have a large fear of breaking peoples networks.

alandekok avatar Jun 11 '24 13:06 alandekok

Sorry it took a while, but I think the functionality to maintain backwards compatibility now works.

jimdigriz avatar Jun 15 '24 13:06 jimdigriz

won't let me merge without signed commits. Could you sign these with your GPG key @jimdigriz. Thanks.

arr2036 avatar Sep 10 '24 18:09 arr2036

won't let me merge without signed commits. Could you sign these with your GPG key @jimdigriz. Thanks.

Sorry for the tardiness, cooking a signing key means I have to do some physical gymnastics with USB keys and it has been a busy week.

Should be okay now, thanks.

jimdigriz avatar Sep 16 '24 09:09 jimdigriz