Module: sip-router Branch: master Commit: 1962f98b3020896ccf705f1dd6a15259fe557139 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1962f98b...
Author: Henning Westerholt henning.westerholt@1und1.de Committer: Henning Westerholt henning.westerholt@1und1.de Date: Mon Apr 26 13:15:19 2010 +0200
htable(k): add a note about the htable size enforcement rules in the mod
---
modules_k/htable/README | 8 +++++--- modules_k/htable/doc/htable_admin.xml | 9 ++++++--- 2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/modules_k/htable/README b/modules_k/htable/README index a9f66c0..9e8fe6f 100644 --- a/modules_k/htable/README +++ b/modules_k/htable/README @@ -123,7 +123,7 @@ Chapter 1. Admin Guide
Example 1.1. Accessing $sht(htname=>key) ... -modparam("htable", "htable", "a=>size=4;") +modparam("htable", "htable", "a=>size=8;") ... $sht(a=>test) = 1; $sht(a=>$ci::srcip) = $si; @@ -145,7 +145,7 @@ $sht(a=>$ci::srcip) = $si;
Example 1.2. Dictionary attack limitation ... -modparam("htable", "htable", "a=>size=4;") +modparam("htable", "htable", "a=>size=8;") ... if(is_present_hf("Authorization")) { @@ -243,7 +243,9 @@ if(is_present_hf("Authorization")) * htname - string specifying the name of the hash table. This string is used by $sht(...) to refer to the hash table. * size - number specifying the size of hash table. Larger value means - less collisions. The number of entries in the table is 2^size. + less collisions. The number of entries in the table is 2^size. The + possible range for this value is from 8 to 14, smaller or larger + values will be increased or decreased respectivly. * autoexpire -time in seconds to delete an item from hash table if no update was done to it. If is missing or set to 0, the items won't expire. diff --git a/modules_k/htable/doc/htable_admin.xml b/modules_k/htable/doc/htable_admin.xml index 0d1ad8d..1257b6f 100644 --- a/modules_k/htable/doc/htable_admin.xml +++ b/modules_k/htable/doc/htable_admin.xml @@ -28,7 +28,7 @@ <title>Accessing $sht(htname=>key)</title> <programlisting format="linespecific"> ... -modparam("htable", "htable", "a=>size=4;") +modparam("htable", "htable", "a=>size=8;") ... $sht(a=>test) = 1; $sht(a=>$ci::srcip) = $si; @@ -55,7 +55,7 @@ $sht(a=>$ci::srcip) = $si; <title>Dictionary attack limitation</title> <programlisting format="linespecific"> ... -modparam("htable", "htable", "a=>size=4;") +modparam("htable", "htable", "a=>size=8;") ... if(is_present_hf("Authorization")) { @@ -220,7 +220,10 @@ if(is_present_hf("Authorization")) <listitem> <para> <emphasis>size</emphasis> - number specifying the size of hash - table. Larger value means less collisions. The number of entries in the table is 2^size. + table. Larger value means less collisions. The number of entries + in the table is 2^size. The possible range for this value is from + 8 to 14, smaller or larger values will be increased or decreased + respectivly. </para> </listitem> <listitem>