Instead of calling get_dpinger_status() again in the code handling dpinger alarms, save the original alarm status in rc.gateway_alarm to a file, then read the status from the file.
Related issues
Bug #9450: Multiwan gateway group fail-over not working as expected (possible race condition)
Prevent possible race condition, fixes #9450
Instead of calling get_dpinger_status() again in the code handling dpinger
alarms, save the original alarm status in rc.gateway_alarm to a file, then
read the status from the file.