diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c index 38f2bc4d0..c467e12c4 100644 --- a/src/cfgparse-listen.c +++ b/src/cfgparse-listen.c @@ -256,8 +256,15 @@ int cfg_parse_listen_match_option(const char *file, int linenum, int kwm, for (optnum = 0; config_opts[optnum].name; optnum++) { if (strcmp(args[1], config_opts[optnum].name) == 0) { if (config_opts[optnum].cap == PR_CAP_NONE) { - ha_alert("parsing [%s:%d]: option '%s' is not supported due to build options.\n", - file, linenum, config_opts[optnum].name); + if (config_opts[optnum].val) + ha_alert("parsing [%s:%d]: support for option '%s' was removed in version %u.%u.\n", + file, linenum, config_opts[optnum].name, + (config_opts[optnum].val >> 8) & 0xff, + config_opts[optnum].val & 0xff); + else + ha_alert("parsing [%s:%d]: option '%s' is not supported due to build options.\n", + file, linenum, config_opts[optnum].name); + *err_code |= ERR_ALERT | ERR_FATAL; goto out; } diff --git a/src/proxy.c b/src/proxy.c index ae1b589a4..6b54a08ea 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -94,7 +94,11 @@ struct show_srv_ctx { } state; }; -/* proxy->options */ +/* proxy->options. For unsupported ones, pass 0 in the "cap" (PR_CAP_*) field. + * If this is due to feature removal, the val field can contain the version the + * option was removed in the "val" (PR_O_*) field as (major<<8)+minor (e.g. + * 0x305 for "3.5"). Pass zero there to indicate build options instead. + */ const struct cfg_opt cfg_opts[] = { { "abortonclose", PR_O_ABRT_CLOSE, PR_CAP_BE|PR_CAP_FE, 0, 0 },