mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MINOR: log/backend: prevent "use-server" rules use with LOG mode
server_rules declared using "use-server" keyword within a proxy are not supported inside a log backend (with "mode log" set), so we report a warning to the user and reset the setting.
This commit is contained in:
parent
f2629ebd4e
commit
661c079bc5
@ -929,6 +929,13 @@ static int _postcheck_log_backend_compat(struct proxy *be)
|
|||||||
err_code |= ERR_WARN;
|
err_code |= ERR_WARN;
|
||||||
ha_free(&be->dyncookie_key);
|
ha_free(&be->dyncookie_key);
|
||||||
}
|
}
|
||||||
|
if (!LIST_ISEMPTY(&be->server_rules)) {
|
||||||
|
ha_warning("Cannot use \"use-server\" rules with 'mode log' in %s '%s'. They will be ignored.\n",
|
||||||
|
proxy_type_str(be), be->id);
|
||||||
|
|
||||||
|
err_code |= ERR_WARN;
|
||||||
|
free_server_rules(&be->server_rules);
|
||||||
|
}
|
||||||
return err_code;
|
return err_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user