From cd9df0dcfe3df46e128472c3e3a0a1a1fbd9e00b Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Tue, 13 Sep 2016 10:42:13 +0200 Subject: T70: Prefix lists, allow le==ge allows ge to be empty --- templates/policy/prefix-list/node.tag/rule/node.def | 2 +- templates/policy/prefix-list6/node.tag/rule/node.def | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/policy/prefix-list/node.tag/rule/node.def b/templates/policy/prefix-list/node.tag/rule/node.def index 9adf6dbe..03692419 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.def @@ -28,7 +28,7 @@ end: len=`echo $VAR(./prefix/@) | awk -F/ '{ print $2 }'` ; cond="ge $VAR(./ge/@) "; fi; if [ -n "$VAR(./le/@)" ]; then - if ! ([ $VAR(./le/@) -ne 32 ] && [ -n "$VAR(./ge/@)" ] && [ $VAR(./le/@) -le $VAR(./ge/@) ]); then + if [ $VAR(./le/@) -ne 32 ] && [ -n "$VAR(./ge/@)" ] && [ $VAR(./le/@) -lt $VAR(./ge/@) ]; then echo "le must be greater than or equal to ge"; exit 1 ; fi ; diff --git a/templates/policy/prefix-list6/node.tag/rule/node.def b/templates/policy/prefix-list6/node.tag/rule/node.def index 1d0f2acc..2f73ebc3 100644 --- a/templates/policy/prefix-list6/node.tag/rule/node.def +++ b/templates/policy/prefix-list6/node.tag/rule/node.def @@ -28,7 +28,7 @@ end: len=`echo $VAR(./prefix/@) | awk -F/ '{ print $2 }'` ; cond="ge $VAR(./ge/@) "; fi; if [ -n "$VAR(./le/@)" ]; then - if ! ([ $VAR(./le/@) -ne 128 ] && [ -n "$VAR(./ge/@)" ] && [ $VAR(./le/@) -le $VAR(./ge/@) ]); then + if [ $VAR(./le/@) -ne 128 ] && [ -n "$VAR(./ge/@)" ] && [ $VAR(./le/@) -lt $VAR(./ge/@) ]; then echo "le must be greater than or equal to ge"; exit 1 ; fi ; -- cgit v1.2.3