summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-22 09:45:17 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-22 10:42:32 -0800
commitb17d21023482c752c490754a11450d4c41c83607 (patch)
treed7c50aed07b3698287f8db2bf8e725e78f8b6ac2
parentcb55706633bda6c5bd7c8391da9193ad0146002b (diff)
downloadvyatta-cfg-quagga-b17d21023482c752c490754a11450d4c41c83607.tar.gz
vyatta-cfg-quagga-b17d21023482c752c490754a11450d4c41c83607.zip
Replace perl address validation with utility
-rw-r--r--templates/interfaces/bonding/node.tag/address/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def3
-rw-r--r--templates/interfaces/bridge/node.tag/address/node.def7
-rw-r--r--templates/interfaces/ethernet/node.tag/address/node.def5
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def3
-rw-r--r--templates/interfaces/loopback/node.tag/address/node.def3
-rw-r--r--templates/interfaces/pseudo-ethernet/node.tag/address/node.def7
-rw-r--r--templates/interfaces/tunnel/node.tag/address/node.def2
8 files changed, 16 insertions, 17 deletions
diff --git a/templates/interfaces/bonding/node.tag/address/node.def b/templates/interfaces/bonding/node.tag/address/node.def
index f577320b..8956dba6 100644
--- a/templates/interfaces/bonding/node.tag/address/node.def
+++ b/templates/interfaces/bonding/node.tag/address/node.def
@@ -2,8 +2,7 @@ multi:
type: txt
help: IP address
-syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-set $VAR(@) --dev $VAR(../@)"\
- ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)"
+syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)"
commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../@)"
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 ed95f20d..236e6ae5 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
@@ -2,8 +2,7 @@ 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(../@)"
+syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)"
commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../../@).$VAR(../@)"
diff --git a/templates/interfaces/bridge/node.tag/address/node.def b/templates/interfaces/bridge/node.tag/address/node.def
index 4644ad8d..cb08069e 100644
--- a/templates/interfaces/bridge/node.tag/address/node.def
+++ b/templates/interfaces/bridge/node.tag/address/node.def
@@ -2,9 +2,11 @@ multi:
priority: 320
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/valid_address $VAR(@)"
+
create: sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@)
+
delete:
if /opt/vyatta/sbin/vyatta-bridgegroup-depedency.pl \
--bridge-notin-proposedcfg \
@@ -16,6 +18,7 @@ delete:
else
sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@)
fi
+
allowed: echo "dhcp <>"
val_help: ipv4net; IP address and prefix length
val_help: ipv6net; IPv6 address and prefix length
diff --git a/templates/interfaces/ethernet/node.tag/address/node.def b/templates/interfaces/ethernet/node.tag/address/node.def
index dfacdb2d..c1bd8fc8 100644
--- a/templates/interfaces/ethernet/node.tag/address/node.def
+++ b/templates/interfaces/ethernet/node.tag/address/node.def
@@ -1,11 +1,8 @@
multi:
-
type: txt
-
help: IP address
-syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-set $VAR(@) --dev $VAR(../@)"\
- ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)"
+syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)"
commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $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 5b2f38dd..535fa6d2 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
@@ -2,8 +2,7 @@ multi:
type: txt
help: IP address
-syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-set $VAR(@) --dev $VAR(../../@).$VAR(../@) "\
- ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../../@).$VAR(../@)"
+syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)"
commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../../@).$VAR(../@)"
diff --git a/templates/interfaces/loopback/node.tag/address/node.def b/templates/interfaces/loopback/node.tag/address/node.def
index 969ecf26..c0ec9386 100644
--- a/templates/interfaces/loopback/node.tag/address/node.def
+++ b/templates/interfaces/loopback/node.tag/address/node.def
@@ -4,8 +4,7 @@ val_help: ipv4net; IPv4 address and prefix length
val_help: ipv6net; IPv6 address and prefix length
help: IP address
-syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-set $VAR(@) --dev $VAR(../@)"; \
- "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)"
+syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)"
create:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@)"; \
"Error setting address $VAR(@) on interface $VAR(../@)"
diff --git a/templates/interfaces/pseudo-ethernet/node.tag/address/node.def b/templates/interfaces/pseudo-ethernet/node.tag/address/node.def
index 42e79606..ad900975 100644
--- a/templates/interfaces/pseudo-ethernet/node.tag/address/node.def
+++ b/templates/interfaces/pseudo-ethernet/node.tag/address/node.def
@@ -1,10 +1,13 @@
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/valid_address $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
diff --git a/templates/interfaces/tunnel/node.tag/address/node.def b/templates/interfaces/tunnel/node.tag/address/node.def
index 6cd40ece..e6a1e542 100644
--- a/templates/interfaces/tunnel/node.tag/address/node.def
+++ b/templates/interfaces/tunnel/node.tag/address/node.def
@@ -4,7 +4,7 @@ val_help: ipv4net; IPv4 address and prefix length
val_help: ipv6net; IPv6 address and prefix length
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/valid_address $VAR(@)"
create:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@)"; "Error setting address $VAR(@) on interface $VAR(../@)"