summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2009-03-12 10:57:14 -0700
committerStig Thormodsrud <stig@vyatta.com>2009-03-12 10:57:14 -0700
commit8aba9259f164d7bc1f3262e3ccd6d5e0399ca51e (patch)
tree2784af68ff3a92b818729828fb612195e48905f3
parentf392c18fea4db80eeae6da6dcbaadd806e47b9ad (diff)
parentdda3cfbdb67dceb8d64b009dd73d44eedcf5094c (diff)
downloadvyatta-cfg-quagga-8aba9259f164d7bc1f3262e3ccd6d5e0399ca51e.tar.gz
vyatta-cfg-quagga-8aba9259f164d7bc1f3262e3ccd6d5e0399ca51e.zip
Merge branch 'jenner' of http://git.vyatta.com/vyatta-cfg-system into jenner
-rw-r--r--debian/changelog13
-rw-r--r--templates/interfaces/bonding/node.tag/disable/node.def7
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.def10
3 files changed, 27 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 7874e30a..1e7a33a2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+vyatta-cfg-system (0.15.3-13) unstable; urgency=low
+
+ [ Mohit Mehta ]
+ * use code from Vyatta::Misc where is_dhcp_enabled() is already
+ defined
+
+ [ Stephen Hemminger ]
+ * Fix perlcritic warning about bare file handle
+ * Fix delete of bonding vif
+ * Don't allow vif on disabled bonding interface
+
+ -- Stephen Hemminger <stephen.hemminger@vyatta.com> Wed, 11 Mar 2009 21:36:16 -0700
+
vyatta-cfg-system (0.15.3-12) unstable; urgency=low
[ Stig Thormodsrud ]
diff --git a/templates/interfaces/bonding/node.tag/disable/node.def b/templates/interfaces/bonding/node.tag/disable/node.def
index 90dd5825..3d3ffef9 100644
--- a/templates/interfaces/bonding/node.tag/disable/node.def
+++ b/templates/interfaces/bonding/node.tag/disable/node.def
@@ -1,5 +1,10 @@
help: Set interface disabled
-update: /etc/netplug/linkdown.d/dhclient $VAR(../@)
+create: vif=`/opt/vyatta/sbin/vyatta-interfaces.pl --vif=$VAR(../@) --show=all`
+ if [ ! -z "$vif" ]; then
+ echo "Can not disable interface " $VAR(../@) " with vif:" $vif
+ exit 1
+ fi
+ /etc/netplug/linkdown.d/dhclient $VAR(../@)
if ! sudo ip link set $VAR(../@) down 2>/dev/null; then
echo "Error disabling dev $VAR(../@)"
/etc/netplug/linkup.d/dhclient $VAR(../@)
diff --git a/templates/interfaces/bonding/node.tag/vif/node.def b/templates/interfaces/bonding/node.tag/vif/node.def
index ddda4d70..c3087022 100644
--- a/templates/interfaces/bonding/node.tag/vif/node.def
+++ b/templates/interfaces/bonding/node.tag/vif/node.def
@@ -2,8 +2,14 @@ tag:
type: u32
help: Set Virtual Local Area Network (VLAN) ID
syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 and 4094"
-create: sudo ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vlan id $VAR(@)
+create: read flags < /sys/class/net/$VAR(../@)/flags
+ if [ $(( flags & 1 )) -eq 0 ]
+ then
+ echo "Can not create VLAN on disabled interface: " $VAR(../@)
+ exit 1
+ fi
+ sudo ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vlan id $VAR(@) || exit 1
sudo ip link set "$VAR(../@).$VAR(@)" up
-delete: sudo ip link delete link "$VAR(../@).$VAR(@)" type vlan id $VAR(@)
+delete: sudo ip link delete dev "$VAR(../@).$VAR(@)" type vlan id $VAR(@)
comp_help: possible completions:
<0-4094> Set VLAN ID