summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-07-21 17:39:20 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-07-21 17:39:20 -0700
commita54e96671b8f5831e95886247d5076d612e072d2 (patch)
treecbc804a4676da411f1b6f33555fc70d260a6ecc2 /templates
parentec0e975fac476e805ba1ff7b8c25238bd492951c (diff)
downloadvyatta-cfg-qos-a54e96671b8f5831e95886247d5076d612e072d2.tar.gz
vyatta-cfg-qos-a54e96671b8f5831e95886247d5076d612e072d2.zip
Check target of redirect before removing ifb
Bug 5889 Deleting input interface not allowed if target of redirect
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/input/node.def6
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/interfaces/input/node.def b/templates/interfaces/input/node.def
index 06b00c9..945c6db 100644
--- a/templates/interfaces/input/node.def
+++ b/templates/interfaces/input/node.def
@@ -7,5 +7,9 @@ val_help: <ifbN>; Input functional block interface name
syntax:expression: pattern $VAR(@) "^ifb[0-9]+$" ; "name must be (ifb0-ifb999)"
begin: [ -d /sys/module/ifb ] || sudo modprobe ifb numifbs=0
+
create: ip link add $VAR(@) type ifb && ip link set $VAR(@) up
-delete: ip link delete dev $VAR(@)
+
+delete: [ -d /sys/class/net/$VAR(@) ] || exit 0
+ /opt/vyatta/sbin/vyatta-qos.pl --check-target $VAR(@) || exit 1
+ ip link delete dev $VAR(@)