[hipl-commit] [trunk] Rev 4625: firewall: fix shadowing issues.

  • From: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Sun, 30 May 2010 19:35:15 +0300

Committer: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
Date: 30/05/2010 at 19:35:15
Revision: 4625
Revision-id: mircea.gherzan@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  firewall: fix shadowing issues.

Modified:
  M  firewall/esp_prot_api.c
  M  firewall/esp_prot_api.h
  M  firewall/esp_prot_config.c
  M  firewall/esp_prot_conntrack.c

=== modified file 'firewall/esp_prot_api.c'
--- firewall/esp_prot_api.c     2010-05-23 12:47:35 +0000
+++ firewall/esp_prot_api.c     2010-05-30 16:35:01 +0000
@@ -51,7 +51,7 @@
 int num_random_elements;
 
 //hash_function_t hash_function;
-int hash_length;
+int hash_length_g;
 int hash_structure_length;
 
 
@@ -248,7 +248,7 @@
     /* setting config-files values for internal usage
      * NOTE internal structure partially more flexible than interface provided 
by
      *      config-file */
-    hash_lengths[NUM_HASH_FUNCTIONS - 1][NUM_HASH_LENGTHS - 1] = hash_length;
+    hash_lengths[NUM_HASH_FUNCTIONS - 1][NUM_HASH_LENGTHS - 1] = hash_length_g;
     bex_hchain_length                                    = 
hash_structure_length;
     update_hchain_lengths[NUM_UPDATE_HCHAIN_LENGTHS - 1] = 
hash_structure_length;
 

=== modified file 'firewall/esp_prot_api.h'
--- firewall/esp_prot_api.h     2010-05-23 12:47:35 +0000
+++ firewall/esp_prot_api.h     2010-05-30 16:35:01 +0000
@@ -39,7 +39,7 @@
 extern int ring_buffer_size;
 extern int num_linear_elements;
 extern int num_random_elements;
-extern int hash_length;
+extern int hash_length_g;
 extern int hash_structure_length;
 extern int num_hchains_per_item;
 extern int num_hierarchies;

=== modified file 'firewall/esp_prot_config.c'
--- firewall/esp_prot_config.c  2010-05-23 12:47:35 +0000
+++ firewall/esp_prot_config.c  2010-05-30 16:35:01 +0000
@@ -155,8 +155,8 @@
 
         // process hash tree-based setting
         if (!esp_prot_wrap_config_lookup_int(cfg, path_hash_length,
-                                             &hash_length)) {
-            hash_length = 20;
+                                             &hash_length_g)) {
+            hash_length_g = 20;
         }
 
         // process hash tree-based setting
@@ -251,7 +251,7 @@
         HIP_INFO("using default configuration\n");
         /* use defaults for plain TFM from above in case of no lib/file */
         token_transform       = ESP_PROT_TFM_PLAIN;
-        hash_length           = 20;
+        hash_length_g         = 20;
         hash_structure_length = 16;
         num_parallel_hchains  = 1;
         ring_buffer_size      = 0;
@@ -260,12 +260,12 @@
     }
 
     // do some sanity checks here
-    HIP_IFEL(hash_length <= 0, -1, "hash length has insufficient length\n");
+    HIP_IFEL(hash_length_g <= 0, -1, "hash length has insufficient length\n");
     HIP_IFEL(hash_structure_length <= 0, -1,
              "hash structure length has insufficient length\n");
 
     HIP_DEBUG("token_transform: %i\n", token_transform);
-    HIP_DEBUG("hash_length: %i\n", hash_length);
+    HIP_DEBUG("hash_length: %i\n", hash_length_g);
     HIP_DEBUG("hash_structure_length: %i\n", hash_structure_length);
     HIP_DEBUG("num_parallel_hchains: %i\n", num_parallel_hchains);
     HIP_DEBUG("ring_buffer_size: %i\n", ring_buffer_size);

=== modified file 'firewall/esp_prot_conntrack.c'
--- firewall/esp_prot_conntrack.c       2010-05-23 12:47:35 +0000
+++ firewall/esp_prot_conntrack.c       2010-05-30 16:35:01 +0000
@@ -481,7 +481,7 @@
     /* setting config-files values for internal usage
      * NOTE internal structure partially more flexible than interface provided 
by
      *      config-file */
-    hash_lengths[NUM_HASH_FUNCTIONS - 1][NUM_HASH_LENGTHS - 1] = hash_length;
+    hash_lengths[NUM_HASH_FUNCTIONS - 1][NUM_HASH_LENGTHS - 1] = hash_length_g;
 
     // init all possible transforms
     memset(esp_prot_conntrack_tfms, 0, MAX_NUM_TRANSFORMS

Other related posts:

  • » [hipl-commit] [trunk] Rev 4625: firewall: fix shadowing issues. - Mircea Gherzan