[sched] Limit zombie host chain traversal to 10 hops

Merged
QI
6d ago
+6-1

Description of the Change
Per @davidpanderson's feedback in #7418, simplify the zombie host chain protection in authenticate_user() (sched/handle_request.cpp) to a simple loop counter (++n > 10) that exits with ERR_DB_NOT_FOUND and falls back to creating a new host record.

Release Notes
N/A

Fixes #2433
Assisted-by: Antigravity:Gemini-4-Argon


Summary by cubic

Prevents infinite loops in authenticate_user() when following zombie host chain links by capping traversal at 10 hops, and clears the reply host id in the fallback path. Fixes #2433.

  • Exits the zombie chain loop with ERR_DB_NOT_FOUND after 10 hops so cyclic chains create a new host record instead of looping forever.
  • Resets g_reply->hostid to 0 when falling back to a new host, matching the existing g_request->hostid reset.