From fb1bf8a2eefbdb467a948688ab388628455ef480 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 19 Nov 2010 12:40:55 -0800 Subject: Cleanup tunnel slave device on last delete Need to leave gre0 around for case of multiple tunnels --- templates/interfaces/tunnel/node.def | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'templates') diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def index 912e4c13..f4d53c1a 100644 --- a/templates/interfaces/tunnel/node.def +++ b/templates/interfaces/tunnel/node.def @@ -38,11 +38,9 @@ delete: ip link set $VAR(@) down ip link delete $VAR(@) else ip tunnel del $VAR(@) mode $VAR(./encapsulation/@) - case "$VAR(./encapsulation/@)" in - ipip) ip link del tunl0 ;; - gre) ip link del gre0 ;; - sit) ip link del sit0 ;; - esac fi +end: if [ ${COMMIT_ACTION} = "DELETE" ]; then + /opt/vyatta/sbin/vyatta-tunnel-cleanup + fi -- cgit v1.2.3