From 148604dc849b1536b648f25b8649b3e13602a609 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 2 Mar 2009 14:27:53 -0800 Subject: RIPNG: allow any interface type Routing protocols should show all interfaces in allowed list. --- templates/protocols/ripng/distribute-list/interface/node.def | 6 +----- templates/protocols/ripng/interface/node.def | 12 +++--------- templates/protocols/ripng/passive-interface/node.def | 5 +---- 3 files changed, 5 insertions(+), 18 deletions(-) (limited to 'templates/protocols/ripng') diff --git a/templates/protocols/ripng/distribute-list/interface/node.def b/templates/protocols/ripng/distribute-list/interface/node.def index 9219eda6..2c29dde8 100644 --- a/templates/protocols/ripng/distribute-list/interface/node.def +++ b/templates/protocols/ripng/distribute-list/interface/node.def @@ -1,13 +1,9 @@ tag: type: txt help: Set to apply filtering to an interface - +allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all syntax:expression: exec "\ if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \ echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " - -allowed: local -a array; - array=( /sys/class/net/{eth,vmnet}* ) ; - echo -n ${array[@]##*/} diff --git a/templates/protocols/ripng/interface/node.def b/templates/protocols/ripng/interface/node.def index 4aa81139..3a967735 100644 --- a/templates/protocols/ripng/interface/node.def +++ b/templates/protocols/ripng/interface/node.def @@ -1,21 +1,15 @@ multi: type: txt help: Set interface name - +allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all syntax:expression: exec " \ if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \ echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " -create: vyatta-vtysh -c "configure terminal" \ - -c "router ripng" \ +create: vyatta-vtysh -c "configure terminal" -c "router ripng" \ -c "network $VAR(@)" -delete: vyatta-vtysh -c "configure terminal" \ - -c "router ripng" \ +delete: vyatta-vtysh -c "configure terminal" -c "router ripng" \ -c "no network $VAR(@)" - -allowed: local -a array; - array=( /sys/class/net/{eth,vmnet}* ) ; - echo -n ${array[@]##*/} diff --git a/templates/protocols/ripng/passive-interface/node.def b/templates/protocols/ripng/passive-interface/node.def index 9654a1d3..4fe2e16b 100644 --- a/templates/protocols/ripng/passive-interface/node.def +++ b/templates/protocols/ripng/passive-interface/node.def @@ -1,7 +1,7 @@ multi: type: txt help: Set to suppress routing updates on an interface - +allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all syntax:expression: exec " \ if [ -z \"`ip addr | grep $VAR(@) `\" ] && [ x$VAR(@) != xdefault ]; then \ echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \ @@ -26,6 +26,3 @@ delete: if [ x$VAR(x) == xdefault ]; then -c "router ripng" \ -c "no passive-interface $VAR(@)"; fi; -allowed: local -a array; - array=( /sys/class/net/{eth,vmnet}* ) ; - echo -n ${array[@]##*/} -- cgit v1.2.3