Only modules can have their return codes updated. Sections can't.
};
+static char const *group_name[];
+
/*
* Compile action && rcode for later use.
*/
value = cf_pair_value(cp);
if (!value) return 0;
+ if (c->type != MOD_SINGLE) {
+ ERROR("%s[%d] Invalid return code assigment inside of a %s section",
+ cf_pair_filename(cp), cf_pair_lineno(cp), group_name[c->type]);
+ return 0;
+ }
+
if (!strcasecmp(value, "return"))
action = MOD_ACTION_RETURN;
--- /dev/null
+# PRE: if
+#
+# return code in an "if" section.
+#
+if (User-Name == "bob") {
+ update reply {
+ Filter-Id := "filter"
+ }
+
+ ok = reject # ERROR
+}