diff options
author | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2012-07-25 17:09:30 -0700 |
---|---|---|
committer | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2012-07-25 17:27:20 -0700 |
commit | 988a11f1a52204b0d50476b94f1de799bf373499 (patch) | |
tree | 3954cca8aaa189ec28ca8360ac5ebbd1e3e75987 | |
parent | 29029d01cf9fa0fff8dbba51e999d985d35c205d (diff) | |
download | vyatta-conntrack-988a11f1a52204b0d50476b94f1de799bf373499.tar.gz vyatta-conntrack-988a11f1a52204b0d50476b94f1de799bf373499.zip |
check protocol timers are configured on commit: bug 8216
(cherry picked from commit b660dd0b194fced4777f1a6589bf351ddbbdfd5d)
3 files changed, 14 insertions, 1 deletions
diff --git a/templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/node.def b/templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/node.def index 7f26da6..ef44b89 100644 --- a/templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/node.def +++ b/templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/node.def @@ -1,2 +1 @@ help: Customize protocol specific timers, one protocol configuration per rule - diff --git a/templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/tcp/node.def b/templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/tcp/node.def index 2d58f9c..04a740b 100644 --- a/templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/tcp/node.def +++ b/templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/tcp/node.def @@ -1 +1,8 @@ help: TCP per connection timeout options +commit:expression: exec " TCP=( $(cli-shell-api listNodes system conntrack timeout custom rule $VAR(../../@) protocol tcp )); \ + if [[ ${TCP[@]} == '' ]]; then \ + echo 'please configure a TCP timer for rule $VAR(../../@)' + exit 1; \ + else \ + exit 0; \ + fi " diff --git a/templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/udp/node.def b/templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/udp/node.def index 321f684..d749f15 100644 --- a/templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/udp/node.def +++ b/templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/udp/node.def @@ -1 +1,8 @@ help: UDP per connection timeout configuration options +commit:expression: exec " UDP=( $(cli-shell-api listNodes system conntrack timeout custom rule $VAR(../../@) protocol udp )); \ + if [[ ${TCP[@]} == '' ]]; then \ + echo 'please configure a UDP timer for rule $VAR(../../@)' + exit 1; \ + else \ + exit 0; \ + fi " |