summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-17 14:05:42 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-17 15:57:12 -0800
commitbd5b9c9e530931238408cd9034c749193a1e70bb (patch)
tree1707f2c5b2c64127611d36cfd2b9e11db674931a /templates
parent805121114825148ebfa64c8dbc44411c0013a50f (diff)
downloadvyatta-cfg-quagga-bd5b9c9e530931238408cd9034c749193a1e70bb.tar.gz
vyatta-cfg-quagga-bd5b9c9e530931238408cd9034c749193a1e70bb.zip
Add address checks to bonding
Need to have same checks as ethernet for valid address on commit.
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/bonding/node.tag/address/node.def10
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def11
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def2
3 files changed, 16 insertions, 7 deletions
diff --git a/templates/interfaces/bonding/node.tag/address/node.def b/templates/interfaces/bonding/node.tag/address/node.def
index 624eab49..f577320b 100644
--- a/templates/interfaces/bonding/node.tag/address/node.def
+++ b/templates/interfaces/bonding/node.tag/address/node.def
@@ -1,10 +1,16 @@
multi:
type: txt
help: IP address
-syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../@)" \
- ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)"
+
+syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-set $VAR(@) --dev $VAR(../@)"\
+ ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)"
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../@)"
+
create:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@)
+
delete:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@)
+
allowed: echo "dhcp <>"
val_help: ipv4net; IP address and prefix length
val_help: ipv6net; IPv6 address and prefix length
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def
index 99f55aad..ed95f20d 100644
--- a/templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def
@@ -1,12 +1,17 @@
multi:
type: txt
help: IP address
+
syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../../@).$VAR(../@) "\
; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../../@).$VAR(../@)"
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $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 <>"
val_help: ipv4; IP address and prefix length
val_help: ipv6; IPv6 address and prefix length
val_help: dhcp; Dynamic Host Configuration Protocol
-
-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(../@)
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def
index a77e9fc8..5b2f38dd 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def
@@ -1,7 +1,5 @@
multi:
-
type: txt
-
help: IP address
syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-set $VAR(@) --dev $VAR(../../@).$VAR(../@) "\