052684f FO: Check server validity before setting status

Authored and Committed by jhrozek 7 years ago
    FO: Check server validity before setting status
    The list of resolved servers is allocated on the back end context and
    kept in the fo_service structure. However, a single request often
    resolves a server and keeps a pointer until the end of a request and
    only then gives feedback about the server based on the request result.
    This presents a big race condition in case the SRV resolution is used.
    When there are requests coming in in parallel, it is possible that an
    incoming request will invalidate a server until another request that
    holds a pointer to the original server is able to give a feedback.
    This patch simply checks if a server is in the list of servers
    maintained by a service before reading its status.
file modified
+1 -0
file modified
+8 -5
file modified
+1 -1