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/ethernet/node.tag/address/node.def | 5 +---- templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'templates/interfaces/ethernet') 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(../@)" -- cgit v1.2.3