summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2008-02-01 17:10:35 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2008-02-01 17:10:35 -0800
commitc86a6b00e60689dcf6d724b52def6dbecbe01873 (patch)
treed1887a58f5b0f324e0d90e1dc3048f396620adec /src
parentb74a46d1c13446aeca6709ccea3ce093069f4eb9 (diff)
downloadvyatta-cfg-c86a6b00e60689dcf6d724b52def6dbecbe01873.tar.gz
vyatta-cfg-c86a6b00e60689dcf6d724b52def6dbecbe01873.zip
fix for bug 2211: "commit:expression:" checks are not evaluated at
"set" time.
Diffstat (limited to 'src')
-rw-r--r--src/cli_new.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cli_new.c b/src/cli_new.c
index dceeaa6..353babd 100644
--- a/src/cli_new.c
+++ b/src/cli_new.c
@@ -1050,9 +1050,10 @@ static boolean check_syn_func(vtw_node *cur,const char* func,int line)
switch(cur->vtw_node_oper) {
case LIST_OP:
- ret = check_syn(cur->vtw_node_left);
- if (!is_in_commit() && cur->vtw_node_aux)
- ret = TRUE;
+ ret = TRUE;
+ if (is_in_commit() || !cur->vtw_node_aux) {
+ ret = check_syn(cur->vtw_node_left);
+ }
if (!ret || !cur->vtw_node_right) /* or no right operand */
return ret;
return check_syn(cur->vtw_node_right);