Skip to content
  • Marc Alff's avatar
    18a8c623
    Bug#17156507 SUCCESSFUL CONNECTION ATTEMPT DOESN'T RESET THE SUM_CONNECT_ERRORS COUNTER · 18a8c623
    Marc Alff authored
    Before this fix, a successful connection failed to reset the per IP address counter
    used to count successive connection failures, that can possibly cause a host to be blocked,
    when reaching max_connect_errors.
    
    This counter is reset by function reset_host_connect_errors().
    This function is called only when connect_errors is non zero,
    as a performance optimization, to avoid locking the host cache for nothing.
    
    The problem was that the connect_error counter was not returned by ip_to_hostname(),
    so that reset_host_connect_errors() was never called for successful connections.
    
    A related minor bug was fixed also: the comparison with max_connect_error was off by one,
    the comparison should use greater or equal instead of strictly greater.
    18a8c623
    Bug#17156507 SUCCESSFUL CONNECTION ATTEMPT DOESN'T RESET THE SUM_CONNECT_ERRORS COUNTER
    Marc Alff authored
    Before this fix, a successful connection failed to reset the per IP address counter
    used to count successive connection failures, that can possibly cause a host to be blocked,
    when reaching max_connect_errors.
    
    This counter is reset by function reset_host_connect_errors().
    This function is called only when connect_errors is non zero,
    as a performance optimization, to avoid locking the host cache for nothing.
    
    The problem was that the connect_error counter was not returned by ip_to_hostname(),
    so that reset_host_connect_errors() was never called for successful connections.
    
    A related minor bug was fixed also: the comparison with max_connect_error was off by one,
    the comparison should use greater or equal instead of strictly greater.
Loading