瀏覽代碼

htable(k): add a note about the htable size enforcement rules in the mod

Henning Westerholt 15 年之前
父節點
當前提交
1962f98b30
共有 2 個文件被更改,包括 11 次插入6 次删除
  1. 5 3
      modules_k/htable/README
  2. 6 3
      modules_k/htable/doc/htable_admin.xml

+ 5 - 3
modules_k/htable/README

@@ -123,7 +123,7 @@ Chapter 1. Admin Guide
 
 
    Example 1.1. Accessing $sht(htname=>key)
    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=>test) = 1;
 $sht(a=>$ci::srcip) = $si;
 $sht(a=>$ci::srcip) = $si;
@@ -145,7 +145,7 @@ $sht(a=>$ci::srcip) = $si;
 
 
    Example 1.2. Dictionary attack limitation
    Example 1.2. Dictionary attack limitation
 ...
 ...
-modparam("htable", "htable", "a=>size=4;")
+modparam("htable", "htable", "a=>size=8;")
 ...
 ...
 if(is_present_hf("Authorization"))
 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
      * htname - string specifying the name of the hash table. This string
        is used by $sht(...) to refer to the hash table.
        is used by $sht(...) to refer to the hash table.
      * size - number specifying the size of hash table. Larger value means
      * 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
      * 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
        update was done to it. If is missing or set to 0, the items won't
        expire.
        expire.

+ 6 - 3
modules_k/htable/doc/htable_admin.xml

@@ -28,7 +28,7 @@
 		<title>Accessing $sht(htname=&gt;key)</title>
 		<title>Accessing $sht(htname=&gt;key)</title>
 	<programlisting format="linespecific">
 	<programlisting format="linespecific">
 ...
 ...
-modparam("htable", "htable", "a=&gt;size=4;")
+modparam("htable", "htable", "a=&gt;size=8;")
 ...
 ...
 $sht(a=&gt;test) = 1;
 $sht(a=&gt;test) = 1;
 $sht(a=&gt;$ci::srcip) = $si;
 $sht(a=&gt;$ci::srcip) = $si;
@@ -55,7 +55,7 @@ $sht(a=&gt;$ci::srcip) = $si;
 	<title>Dictionary attack limitation</title>
 	<title>Dictionary attack limitation</title>
 	<programlisting format="linespecific">
 	<programlisting format="linespecific">
 ...
 ...
-modparam("htable", "htable", "a=&gt;size=4;")
+modparam("htable", "htable", "a=&gt;size=8;")
 ...
 ...
 if(is_present_hf("Authorization"))
 if(is_present_hf("Authorization"))
 {
 {
@@ -220,7 +220,10 @@ if(is_present_hf("Authorization"))
 		<listitem>
 		<listitem>
 		<para>
 		<para>
 			<emphasis>size</emphasis> - number specifying the size of hash
 			<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>
 		</para>
 		</listitem>
 		</listitem>
 		<listitem>
 		<listitem>