summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorslioch <slioch@eng-140.vyatta.com>2009-04-11 15:27:42 -0700
committerslioch <slioch@eng-140.vyatta.com>2009-04-11 15:27:42 -0700
commit664f649d0f455bd7f60b06659bf81d9bed952fe2 (patch)
treef06a492360128fb6524d33f2af1e64f9ce16f199
parent1735d755d46708553cd0cf454c88af6286264184 (diff)
downloadvyatta-cfg-664f649d0f455bd7f60b06659bf81d9bed952fe2.tar.gz
vyatta-cfg-664f649d0f455bd7f60b06659bf81d9bed952fe2.zip
wild cards are now supported on terminating nodes in the priority file:
So, 100 load-balancing/wan/rule/node.tag/* applies the priority of "100" to all children of the multinode "rule:value" NEW TRANS + source (t: 0, p: 333) + address (t: 0, p: 1000) + 1.1.1.1/32 (t: 8, p: 1000) [VALUE] NEW TRANS + protocol (t: 0, p: 333) + all (t: 8, p: 1000) [VALUE] [SYNTAX] NEW TRANS + protocol (t: 0, p: 333) + all (t: 8, p: 1000) [VALUE] [SYNTAX] NEW TRANS + load-balancing (t: 0, p: 1000) + wan (t: 0, p: 1000) [DELETE] [COMMIT] + rule (t: 0, p: 1000) [MULTI] + 1 (t: 1, p: 1000) [VALUE] + 2 (t: 1, p: 1000) [VALUE] Where protocol is a child node of "rule:value" This should allow us to compress some of the entries given the current state of the priority file.
-rw-r--r--src/common/unionfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/unionfs.c b/src/common/unionfs.c
index 8cd5213..b0128c3 100644
--- a/src/common/unionfs.c
+++ b/src/common/unionfs.c
@@ -771,6 +771,9 @@ match_priority_node(GNode *node, gchar** tok_str, int pri)
else if (strncmp(NODE_TAG_FILE,tok_str[index],strlen(NODE_TAG_FILE)) == 0) {
match_priority_node(child,tok_str,pri);
}
+ else if (strncmp("*",tok_str[index],1) == 0) { //wildcard
+ match_priority_node(child,tok_str,pri);
+ }
child = g_node_next_sibling(child);
}
return;