[master] 294b1ff29 Fail attempts to set parameters which have NOT_IMPLEMENTED set.

Poul-Henning Kamp phk at FreeBSD.org
Tue Aug 17 08:07:06 UTC 2021


commit 294b1ff29487ca3f980f793e51c50e0013eea02f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Aug 17 07:53:51 2021 +0000

    Fail attempts to set parameters which have NOT_IMPLEMENTED set.

diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c
index 08dc48233..34e23d466 100644
--- a/bin/varnishd/mgt/mgt_param.c
+++ b/bin/varnishd/mgt/mgt_param.c
@@ -501,6 +501,14 @@ MCF_ParamSet(struct cli *cli, const char *param, const char *val)
 		VCLI_Out(cli, "Unknown parameter \"%s\".", param);
 		return;
 	}
+	if (pp->flags & NOT_IMPLEMENTED) {
+		VCLI_SetResult(cli, CLIS_CANT);
+		VCLI_Out(cli,
+		    "parameter \"%s\" is not available on this platform.",
+		    param
+		);
+		return;
+	}
 	if (pp->flags & PROTECTED) {
 		VCLI_SetResult(cli, CLIS_AUTH);
 		VCLI_Out(cli, "parameter \"%s\" is protected.", param);


More information about the varnish-commit mailing list