summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2011-05-25 17:29:54 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2011-05-25 17:29:54 -0700
commitd61ce5aa1c7b2a8e9d77d2a3e34f9b996ed6a6fb (patch)
treef1583aa63a0929532e8f120d40d1b167feffc797
parent31f3d30599b976bfd033b7c69b2aa1394541d879 (diff)
parent29e419548be1390824eb8e0bf29c57a00c444359 (diff)
downloadvyatta-cfg-quagga-d61ce5aa1c7b2a8e9d77d2a3e34f9b996ed6a6fb.tar.gz
vyatta-cfg-quagga-d61ce5aa1c7b2a8e9d77d2a3e34f9b996ed6a6fb.zip
Merge branch 'napa' of suva.vyatta.com:/git/vyatta-cfg-system into napa
-rw-r--r--debian/changelog6
-rwxr-xr-xscripts/vyatta-tunnel-cleanup8
-rw-r--r--templates/interfaces/tunnel/node.def9
3 files changed, 15 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog
index 9c946308..f4ca42d5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+vyatta-cfg-system (0.19.89) unstable; urgency=low
+
+ * alternative fix for bug 6958
+
+ -- An-Cheng Huang <ancheng@vyatta.com> Wed, 25 May 2011 13:44:44 -0700
+
vyatta-cfg-system (0.19.88) unstable; urgency=low
* don't assume hw-id exists since it can be deleted
diff --git a/scripts/vyatta-tunnel-cleanup b/scripts/vyatta-tunnel-cleanup
index 6094818c..979fb7bd 100755
--- a/scripts/vyatta-tunnel-cleanup
+++ b/scripts/vyatta-tunnel-cleanup
@@ -15,13 +15,17 @@ my %encapsulation = (
'sit' => 'sit',
);
+# interface being deleted
+my $interface = $ARGV[0];
+
# Create map of encapsulations still in use
my $config = new Vyatta::Config;
$config->setLevel("interfaces tunnel");
my %tunnel;
-foreach my $tun ( $config->listNodes() ) {
- my $mode = $config->returnValue("$tun encapsulation");
+foreach my $tun ( $config->listEffectiveNodes() ) {
+ my $mode = $config->returnEffectiveValue("$tun encapsulation");
+ next if ($interface eq $tun); # don't count the one being deleted
$tunnel{$mode} = 1;
}
diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def
index c8670a16..669f7636 100644
--- a/templates/interfaces/tunnel/node.def
+++ b/templates/interfaces/tunnel/node.def
@@ -40,10 +40,7 @@ delete: ip link set $VAR(@) down
ip tunnel del $VAR(@) mode $VAR(./encapsulation/@)
fi
-end: if [ "$COMMIT_SIBLING_POSITION" = "LAST" ] || \
- [ "$COMMIT_SIBLING_POSITION" = "FIRSTLAST" ] ; then
- if [ ${COMMIT_ACTION} = "DELETE" ]; then
- /opt/vyatta/sbin/vyatta-tunnel-cleanup
- fi
- fi
+end: if [ "${COMMIT_ACTION}" == DELETE ]; then
+ /opt/vyatta/sbin/vyatta-tunnel-cleanup $VAR(@)
+ fi