summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaurav Sinha <gaurav.sinha@vyatta.com>2012-07-25 17:09:30 -0700
committerGaurav Sinha <gaurav.sinha@vyatta.com>2012-07-25 17:09:30 -0700
commitb660dd0b194fced4777f1a6589bf351ddbbdfd5d (patch)
tree32316843beda88710b6bc23f08c785f044fd04ce
parentb6ac812dd1e4e54a08b94c068b900e2136417477 (diff)
downloadvyatta-conntrack-b660dd0b194fced4777f1a6589bf351ddbbdfd5d.tar.gz
vyatta-conntrack-b660dd0b194fced4777f1a6589bf351ddbbdfd5d.zip
check protocol timers are configured on commit: bug 8216
-rw-r--r--templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/node.def1
-rw-r--r--templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/tcp/node.def7
-rw-r--r--templates-cfg/system/conntrack/timeout/custom/rule/node.tag/protocol/udp/node.def7
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 "