From a4759d4b161ed6e6db9efb65f611cbd746529590 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 12 Jun 2009 18:38:31 -0700 Subject: Remove ability to add vif to macvlan Macvlan and vlan tagging doesn't work right in the kernel (2.6.29) so wait till it is fixed upstream. (cherry picked from commit aaed494ef8bbe580da4d378e4844bb0203987d97) --- .../interfaces/pseudo-ethernet/node.tag/vif/node.def | 20 -------------------- .../node.tag/vif/node.tag/address/node.def | 12 ------------ .../node.tag/vif/node.tag/description/node.def | 4 ---- .../vif/node.tag/disable-link-detect/node.def | 3 --- .../node.tag/vif/node.tag/disable/node.def | 11 ----------- 5 files changed, 50 deletions(-) delete mode 100644 templates/interfaces/pseudo-ethernet/node.tag/vif/node.def delete mode 100644 templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/address/node.def delete mode 100644 templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/description/node.def delete mode 100644 templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable-link-detect/node.def delete mode 100644 templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable/node.def (limited to 'templates') diff --git a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.def b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.def deleted file mode 100644 index bca63071..00000000 --- a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.def +++ /dev/null @@ -1,20 +0,0 @@ -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: 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 - /opt/vyatta/sbin/vyatta-link-detect "$VAR(../@).$VAR(@)" on -delete: sudo ip link delete dev "$VAR(../@).$VAR(@)" type vlan id $VAR(@) -comp_help: possible completions: - <0-4094> Set VLAN ID - - - - diff --git a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/address/node.def b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/address/node.def deleted file mode 100644 index 4c93905f..00000000 --- a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/address/node.def +++ /dev/null @@ -1,12 +0,0 @@ -multi: -type: txt -help: Set an IP address for this interface -syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../../@).$VAR(../@) "\ - ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../../@).$VAR(../@)" -create:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../../@).$VAR(../@) -delete:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../../@).$VAR(../@) -allowed: echo "dhcp <>" -comp_help:Possible completions: - Set the IP address and prefix length - Set the IPv6 address and prefix length - dhcp Set the IP address and prefix length via DHCP diff --git a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/description/node.def b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/description/node.def deleted file mode 100644 index 40f04bcc..00000000 --- a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/description/node.def +++ /dev/null @@ -1,4 +0,0 @@ -type: txt -help: Set description for this interface -update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias" -delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias" diff --git a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable-link-detect/node.def b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable-link-detect/node.def deleted file mode 100644 index 897113de..00000000 --- a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable-link-detect/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Set to ignore link state changes on this interface -update:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../@).$VAR(../@) on -delete:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../@).$VAR(../@) off diff --git a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable/node.def b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable/node.def deleted file mode 100644 index 78b24870..00000000 --- a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable/node.def +++ /dev/null @@ -1,11 +0,0 @@ -help: Set interface disabled -update: /etc/netplug/linkdown.d/dhclient $VAR(../../@).$VAR(../@) - if ! sudo ip link set $VAR(../../@).$VAR(../@) down 2>/dev/null; then - echo "Error disabling dev $VAR(../../@).$VAR(../@)" - /etc/netplug/linkup.d/dhclient $VAR(../../@).$VAR(../@) - exit 1 - fi -delete: if ! sudo ip link set $VAR(../../@).$VAR(../@) up; then - echo "Error enabling dev $VAR(../../@).$VAR(../@)" - exit 1 - fi -- cgit v1.2.3