Skip to content

API fixes for next-major branch#246

Merged
RoadRunnr merged 2 commits intofeature/next-majorfrom
fix/cennso-1959-api-fixes
Mar 4, 2026
Merged

API fixes for next-major branch#246
RoadRunnr merged 2 commits intofeature/next-majorfrom
fix/cennso-1959-api-fixes

Conversation

@RoadRunnr
Copy link
Member

No description provided.

…ent field

- packet/1: pre-generate random authenticator for 'request' cmd before
  encoding attributes, so that scramble encryption (User-Password) and
  Message-Authenticator HMAC computation both use the same authenticator
  value that will be written into the packet header

- encode_body/2 for 'request': use pre-generated authenticator from packet/1
  if present, instead of always generating a new one

- encode_message_authenticator/2: fix typo 'reqid' -> 'req_id' in pattern
  match, so Message-Authenticator HMAC is actually computed when msg_hmac=true

- request/4: make 'client' field optional in NAS map (fall back to <<>>),
  since NAS maps often only carry 'secret' and omitting 'client' caused a
  function_clause crash on the server side when decoding incoming packets
- handle_call({reconfigure, ...}): also update #state.servers when
  reconfiguring, so that new servers are actually used for sending requests
  (previously only config was updated, leaving servers empty → no_active_servers)

- start_client/1: return the client manager pid instead of the supervisor pid,
  so callers can pass it directly to eradius_client:send_request/3,4
  (previously the supervisor pid was returned, causing send_request to crash
  with {wanna_send,...} arriving at the supervisor gen_server)
@RoadRunnr RoadRunnr requested a review from a team as a code owner March 4, 2026 10:12
@RoadRunnr RoadRunnr merged commit f834f21 into feature/next-major Mar 4, 2026
6 checks passed
@RoadRunnr RoadRunnr deleted the fix/cennso-1959-api-fixes branch March 4, 2026 10:13
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.

1 participant