[hipl-commit] [trunk] Rev 4741: firewall: mark/remove the last unused parameters.

  • From: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Wed, 9 Jun 2010 16:42:12 +0300

Committer: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
Date: 09/06/2010 at 16:42:12
Revision: 4741
Revision-id: mircea.gherzan@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  firewall: mark/remove the last unused parameters.

Modified:
  M  firewall/firewall.c
  M  firewall/firewall.h
  M  firewall/firewall_control.c
  M  firewall/rule_management.c
  M  firewall/user_ipsec_esp.c
  M  firewall/user_ipsec_fw_msg.c
  M  firewall/user_ipsec_fw_msg.h
  M  firewall/user_ipsec_sadb.c

=== modified file 'firewall/firewall.c'
--- firewall/firewall.c 2010-06-01 15:40:11 +0000
+++ firewall/firewall.c 2010-06-09 13:41:52 +0000
@@ -44,8 +44,10 @@
 #include <sys/utsname.h>
 #include <sys/wait.h>
 #include <linux/netfilter_ipv4.h>
+
 #include "lib/core/builder.h"
 #include "lib/core/capability.h"
+#include "lib/core/common_defines.h"
 #include "lib/core/debug.h"
 #include "lib/core/filemanip.h"
 #include "lib/core/hip_udp.h"
@@ -1214,11 +1216,11 @@
 /**
  * Process a TCP packet from the forward packet capture queue
  *
- * @param ctx the packet context
+ * @param ctx the packet context, required because of the handler format
  *
  * @return the verdict (1 for pass and 0 for drop)
  */
-static int hip_fw_handle_tcp_forward(hip_fw_context_t *ctx)
+static int hip_fw_handle_tcp_forward(UNUSED hip_fw_context_t *ctx)
 {
     HIP_DEBUG("\n");
 
@@ -2221,7 +2223,7 @@
  * @todo This doesn't make sense. However, setting 0 prevents connection
  *       tracking.
  */
-void set_stateful_filtering(const int active)
+void set_stateful_filtering(void)
 {
     statefulFiltering = 1;
 }

=== modified file 'firewall/firewall.h'
--- firewall/firewall.h 2010-05-26 10:28:47 +0000
+++ firewall/firewall.h 2010-06-09 13:41:52 +0000
@@ -24,7 +24,7 @@
 int hip_fw_uninit_opptcp(void);
 int hip_fw_init_proxy(void);
 int hip_fw_uninit_proxy(void);
-void set_stateful_filtering(const int active);
+void set_stateful_filtering(void);
 hip_hit_t *hip_fw_get_default_hit(void);
 hip_lsi_t *hip_fw_get_default_lsi(void);
 

=== modified file 'firewall/firewall_control.c'
--- firewall/firewall_control.c 2010-06-01 15:40:11 +0000
+++ firewall/firewall_control.c 2010-06-09 13:41:52 +0000
@@ -107,7 +107,7 @@
         break;
     case HIP_MSG_IPSEC_FLUSH_ALL_SA:
         HIP_DEBUG("Received flush all sa request from hipd\n");
-        HIP_IFEL(handle_sa_flush_all_request(msg), -1,
+        HIP_IFEL(handle_sa_flush_all_request(), -1,
                  "hip userspace sadb flush all did NOT succeed\n");
         break;
     case HIP_MSG_TURN_INFO:

=== modified file 'firewall/rule_management.c'
--- firewall/rule_management.c  2010-06-09 13:25:36 +0000
+++ firewall/rule_management.c  2010-06-09 13:41:52 +0000
@@ -969,7 +969,7 @@
     }
 
     input_rules   = (DList *) input;
-    set_stateful_filtering(state);
+    set_stateful_filtering();
     output_rules  = (DList *) output;
     forward_rules = (DList *) forward;
 }

=== modified file 'firewall/user_ipsec_esp.c'
--- firewall/user_ipsec_esp.c   2010-06-08 07:28:34 +0000
+++ firewall/user_ipsec_esp.c   2010-06-09 13:41:52 +0000
@@ -74,9 +74,7 @@
  */
 static void add_udp_header(struct udphdr *udp_hdr,
                            const uint16_t packet_len,
-                           const hip_sa_entry_t *entry,
-                           const struct in6_addr *src_addr,
-                           const struct in6_addr *dst_addr)
+                           const hip_sa_entry_t *entry)
 {
     udp_hdr->source = htons(entry->src_port);
 
@@ -250,7 +248,7 @@
         if (entry->encap_mode == 1) {
             // the length field covers everything starting with UDP header
             add_udp_header(out_udp_hdr, *esp_packet_len - sizeof(struct ip),
-                           entry, preferred_local_addr, preferred_peer_addr);
+                           entry);
 
             // now we can also calculate the csum of the new packet
             add_ipv4_header(out_ip_hdr, preferred_local_addr,

=== modified file 'firewall/user_ipsec_fw_msg.c'
--- firewall/user_ipsec_fw_msg.c        2010-05-23 13:14:30 +0000
+++ firewall/user_ipsec_fw_msg.c        2010-06-09 13:41:52 +0000
@@ -241,7 +241,7 @@
  * @param msg the received message
  * @return 0, if message sent and received ok, != 0 else
  */
-int handle_sa_flush_all_request(const struct hip_common *msg)
+int handle_sa_flush_all_request(void)
 {
     int err = 0;
 

=== modified file 'firewall/user_ipsec_fw_msg.h'
--- firewall/user_ipsec_fw_msg.h        2010-03-18 21:15:21 +0000
+++ firewall/user_ipsec_fw_msg.h        2010-06-09 13:41:52 +0000
@@ -18,6 +18,6 @@
 int send_userspace_ipsec_to_hipd(const int activate);
 int handle_sa_add_request(const struct hip_common *msg);
 int handle_sa_delete_request(const struct hip_common *msg);
-int handle_sa_flush_all_request(const struct hip_common *msg);
+int handle_sa_flush_all_request(void);
 
 #endif /* HIP_FIREWALL_USER_IPSEC_FW_MSG_H */

=== modified file 'firewall/user_ipsec_sadb.c'
--- firewall/user_ipsec_sadb.c  2010-06-08 07:28:34 +0000
+++ firewall/user_ipsec_sadb.c  2010-06-09 13:41:52 +0000
@@ -23,6 +23,7 @@
 #include <sys/time.h>
 
 #include "lib/core/builder.h"
+#include "lib/core/common_defines.h"
 #include "lib/core/debug.h"
 #include "lib/core/esp_prot_common.h"
 #include "lib/core/hashchain.h"
@@ -771,7 +772,7 @@
                  int ealg, struct hip_crypto_key *auth_key, struct 
hip_crypto_key *enc_key,
                  uint64_t lifetime, uint8_t esp_prot_transform, uint32_t 
hash_item_length,
                  uint16_t esp_num_anchors, unsigned char 
(*esp_prot_anchors)[MAX_HASH_LENGTH],
-                 int retransmission, int update)
+                 UNUSED int retransmission, int update)
 {
     int err                          = 0;
     struct in6_addr *check_local_hit = NULL;

Other related posts:

  • » [hipl-commit] [trunk] Rev 4741: firewall: mark/remove the last unused parameters. - Mircea Gherzan