From c26ac4f834374d4590cf93275d74c644319bec79 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Fri, 10 Sep 2010 16:45:55 -0700 Subject: Fix Bug 5309 Allow modifyining TCP MSS option * add the ability to modify TCP MSS value using modify|ipv6-modify rulesets --- .../node.tag/rule/node.tag/modify/tcp-mss/node.def | 21 +++++++++++++++++++++ .../node.tag/rule/node.tag/modify/tcp-mss/node.def | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 templates/firewall/ipv6-modify/node.tag/rule/node.tag/modify/tcp-mss/node.def create mode 100644 templates/firewall/modify/node.tag/rule/node.tag/modify/tcp-mss/node.def (limited to 'templates') diff --git a/templates/firewall/ipv6-modify/node.tag/rule/node.tag/modify/tcp-mss/node.def b/templates/firewall/ipv6-modify/node.tag/rule/node.tag/modify/tcp-mss/node.def new file mode 100644 index 0000000..8d2248e --- /dev/null +++ b/templates/firewall/ipv6-modify/node.tag/rule/node.tag/modify/tcp-mss/node.def @@ -0,0 +1,21 @@ +type: txt +help: TCP Maximum Segment Size + +syntax:expression: +exec " +if [[ $VAR(@) =~ ^[[:alpha:]]*$ ]]; then \ + if [ $VAR(@) == \"pmtu\" ]; then \ + exit 0; \ + fi; \ +else \ + if [[ ( $VAR(@) =~ ^[[:digit:]]*$ ) && \ + ( $VAR(@) -ge \"500\" ) && \ + ( $VAR(@) -le \"1460\" ) ]]; then \ + exit 0; \ + fi; \ +fi; \ +echo Value must be \\'pmtu\\' or a number between 500 and 1460; \ +exit 1" + +val_help: pmtu; Automatically set to Path Maximum Transfer Unit minus 60 bytes +val_help: 500-1460; Explicitly set TCP MSS value diff --git a/templates/firewall/modify/node.tag/rule/node.tag/modify/tcp-mss/node.def b/templates/firewall/modify/node.tag/rule/node.tag/modify/tcp-mss/node.def new file mode 100644 index 0000000..7a61966 --- /dev/null +++ b/templates/firewall/modify/node.tag/rule/node.tag/modify/tcp-mss/node.def @@ -0,0 +1,21 @@ +type: txt +help: TCP Maximum Segment Size + +syntax:expression: +exec " +if [[ $VAR(@) =~ ^[[:alpha:]]*$ ]]; then \ + if [ $VAR(@) == \"pmtu\" ]; then \ + exit 0; \ + fi; \ +else \ + if [[ ( $VAR(@) =~ ^[[:digit:]]*$ ) && \ + ( $VAR(@) -ge \"500\" ) && \ + ( $VAR(@) -le \"1460\" ) ]]; then \ + exit 0; \ + fi; \ +fi; \ +echo Value must be \\'pmtu\\' or a number between 500 and 1460; \ +exit 1" + +val_help: pmtu; Automatically set to Path Maximum Transfer Unit minus 40 bytes +val_help: 500-1460; Explicitly set TCP MSS value -- cgit v1.2.3