unsigned int backlog; /* force the frontend's listen backlog */
unsigned int bind_proc; /* bitmask of processes using this proxy. 0 = all. */
struct error_snapshot invalid_req, invalid_rep; /* captures of last errors */
+
+ /* used only during configuration parsing */
+ int no_options; /* PR_O_REDISP, PR_O_TRANSP, ... */
+ int no_options2; /* PR_O2_* */
};
struct switching_rule {
curproxy->state = defproxy.state;
curproxy->options = defproxy.options;
curproxy->options2 = defproxy.options2;
+ curproxy->no_options = defproxy.no_options;
+ curproxy->no_options2 = defproxy.no_options2;
curproxy->bind_proc = defproxy.bind_proc;
curproxy->lbprm.algo = defproxy.lbprm.algo;
curproxy->except_net = defproxy.except_net;
if (warnifnotcap(curproxy, cfg_opts[optnum].cap, file, linenum, args[1], NULL))
return 0;
- if (!inv)
- curproxy->options |= cfg_opts[optnum].val;
- else
- curproxy->options &= ~cfg_opts[optnum].val;
+ if (!inv) {
+ curproxy->no_options &= ~cfg_opts[optnum].val;
+ curproxy->options |= cfg_opts[optnum].val;
+ } else {
+ curproxy->options &= ~cfg_opts[optnum].val;
+ curproxy->no_options |= cfg_opts[optnum].val;
+ }
return 0;
}
if (warnifnotcap(curproxy, cfg_opts2[optnum].cap, file, linenum, args[1], NULL))
return 0;
- if (!inv)
- curproxy->options2 |= cfg_opts2[optnum].val;
- else
- curproxy->options2 &= ~cfg_opts2[optnum].val;
-
+ if (!inv) {
+ curproxy->no_options2 &= ~cfg_opts2[optnum].val;
+ curproxy->options2 |= cfg_opts2[optnum].val;
+ } else {
+ curproxy->options2 &= ~cfg_opts2[optnum].val;
+ curproxy->no_options2 |= cfg_opts2[optnum].val;
+ }
return 0;
}
}