From b17d21023482c752c490754a11450d4c41c83607 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 22 Nov 2010 09:45:17 -0800 Subject: Replace perl address validation with utility --- templates/interfaces/pseudo-ethernet/node.tag/address/node.def | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'templates/interfaces/pseudo-ethernet') 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 -- cgit v1.2.3