From 89a8f27b3d905501c9097544f27dd76208303b80 Mon Sep 17 00:00:00 2001 From: slioch Date: Mon, 2 Nov 2009 17:22:05 -0800 Subject: fix for missing priority value on embedded multinode. bug behavior was more limited than this--at least tag node.def and multiple configuration on commit. tested fix with limited regression test. also slightly modified break on priority values where embedded multinodes with priority values are treated as discrete transactions (which isolates failures within the multinode and not the parent of the multinode). --- src/common/unionfs.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/common/unionfs.c b/src/common/unionfs.c index 45127e8..452c774 100644 --- a/src/common/unionfs.c +++ b/src/common/unionfs.c @@ -225,13 +225,6 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) } //either multi or tag--shouldn't have made a difference, but arkady was confused. vn->_config._multi = (def.tag | def.multi); - if (def.def_priority == 0) { - vn->_config._priority = LOWEST_PRIORITY; - } - else { - vn->_config._priority = def.def_priority; - } - } } @@ -252,12 +245,6 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) //Need to do two things: // 1. Come to agreement on where the behavior splits on priority multinodes // 2. Not check for tag node in the def datastructure but use the new datastructure as at some point tag and multi will be the same - if (vn_parent->_config._def.tag == TRUE) { //only for embedded multinodes - vn->_config._priority = vn_parent->_config._priority; - vn_parent->_config._priority = LOWEST_PRIORITY; - } - - //now let's patch up the def multi-nodes //move the def for the multinode from the parent to the value node struct VyattaNode* vn2 = (struct VyattaNode*)node->data; @@ -282,6 +269,25 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) } } + + if (G_NODE_IS_ROOT(node) == FALSE) { + struct VyattaNode* vn_parent = (struct VyattaNode*)node->parent->data; + struct VyattaNode* vn = (struct VyattaNode*)node->data; + // vn->_config._priority = vn_parent->_config._def.def_priority; + if (vn->_config._def.tag && vn->_config._multi) { + vn->_config._priority = LOWEST_PRIORITY; + } + else if (vn->_config._def.def_priority == 0) { + vn->_config._priority = LOWEST_PRIORITY; + } + else { + vn->_config._priority = vn->_config._def.def_priority; + } + } + + + + if (final_node == TRUE) { //move defs to child... get_term_data_values(node); -- cgit v1.2.3 From a889b4efa38f86c2704595ad6c4e6f665bd2ce91 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 2 Nov 2009 17:26:42 -0800 Subject: 0.15.37 --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index dc212c3..9febd26 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +vyatta-cfg (0.15.37) unstable; urgency=low + + [ slioch ] + * fix for missing priority value on embedded multinode. bug behavior + was more limited than this--at least tag node.def and multiple + + -- root Mon, 02 Nov 2009 17:26:42 -0800 + vyatta-cfg (0.15.36) unstable; urgency=low [ David S. Madole ] -- cgit v1.2.3 From 70ba0c76a9c7c7699e1b2f612277d56d99828a49 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Tue, 3 Nov 2009 11:21:23 -0800 Subject: Fix uninitialized variable when reading carrier on admin down interface. --- lib/Vyatta/Interface.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Vyatta/Interface.pm b/lib/Vyatta/Interface.pm index 924058a..ce909f0 100755 --- a/lib/Vyatta/Interface.pm +++ b/lib/Vyatta/Interface.pm @@ -228,6 +228,7 @@ sub carrier { or return; my $val = <$carrier>; + $val = 0 if ! defined $val # proc entry not readable on down interface chomp $val; close $carrier; return $val; -- cgit v1.2.3 From d24423e69941fb54de93fa997c06463208e6a38d Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Tue, 3 Nov 2009 11:22:04 -0800 Subject: 0.15.38 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 9febd26..a5c6c50 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +vyatta-cfg (0.15.38) unstable; urgency=low + + * Fix uninitialized variable when reading carrier on admin down + interface. + + -- Stig Thormodsrud Tue, 03 Nov 2009 11:22:03 -0800 + vyatta-cfg (0.15.37) unstable; urgency=low [ slioch ] -- cgit v1.2.3 From 198f9a033a8d9cdb2220579cc2df1484476b2c93 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Wed, 4 Nov 2009 08:15:57 -0800 Subject: Fix missing semicolon. --- lib/Vyatta/Interface.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Vyatta/Interface.pm b/lib/Vyatta/Interface.pm index ce909f0..513f686 100755 --- a/lib/Vyatta/Interface.pm +++ b/lib/Vyatta/Interface.pm @@ -228,7 +228,7 @@ sub carrier { or return; my $val = <$carrier>; - $val = 0 if ! defined $val # proc entry not readable on down interface + $val = 0 if ! defined $val; # proc entry not readable on down interface chomp $val; close $carrier; return $val; -- cgit v1.2.3 From 700befa72bca86d054853820e8eaa8c34ddd1d4a Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Wed, 4 Nov 2009 08:16:12 -0800 Subject: 0.15.39 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index a5c6c50..7d6caef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg (0.15.39) unstable; urgency=low + + * Fix missing semicolon. + + -- Stig Thormodsrud Wed, 04 Nov 2009 08:16:11 -0800 + vyatta-cfg (0.15.38) unstable; urgency=low * Fix uninitialized variable when reading carrier on admin down -- cgit v1.2.3