[hipl-dev] [Branch ~hipl-core/hipl/mobility-fixes] Rev 5184: merged lp:hipl revision 5173

  • From: noreply@xxxxxxxxxxxxx
  • To: HIPL core team <hipl-dev@xxxxxxxxxxxxx>
  • Date: Tue, 23 Nov 2010 15:03:34 -0000

Merge authors:
  Andrius Bentkus <andrius.bentkus@xxxxxxxxxxxxxx>
  Diego Biurrun (diego-biurrun)
  René Hummen (rene-hummen)
------------------------------------------------------------
revno: 5184 [merge]
committer: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx>
branch nick: mobility-fixes
timestamp: Tue 2010-11-23 15:57:46 +0100
message:
  merged lp:hipl revision 5173
modified:
  .bzrignore
  Makefile.am
  configure.ac
  firewall/esp_prot_conntrack.c
  lib/core/prefix.c
  modules/heartbeat/hipd/heartbeat.c
  modules/heartbeat/hipd/heartbeat.h
  modules/heartbeat_update/hipd/hb_update.c
  modules/heartbeat_update/hipd/hb_update.h
  modules/update/hipd/update.c
  modules/update/hipd/update.h
  modules/update/hipd/update_legacy.c
  modules/update/hipd/update_legacy.h
  packaging/hipl-deb.spec
  test/lib/core/hit.c
  test/lib/core/straddr.c


--
lp:~hipl-core/hipl/mobility-fixes
https://code.launchpad.net/~hipl-core/hipl/mobility-fixes

Your team HIPL core team is subscribed to branch 
lp:~hipl-core/hipl/mobility-fixes.
To unsubscribe from this branch go to 
https://code.launchpad.net/~hipl-core/hipl/mobility-fixes/+edit-subscription
=== modified file '.bzrignore'
--- .bzrignore  2010-11-12 17:49:42 +0000
+++ .bzrignore  2010-11-22 17:28:01 +0000
@@ -47,6 +47,8 @@
 tags
 test/auth_performance
 test/certteststub
+test/check_firewall
+test/check_lib_core
 test/dh_performance
 test/fw_port_bindings_performance
 test/hc_performance

=== modified file 'Makefile.am'
--- Makefile.am 2010-11-16 14:38:02 +0000
+++ Makefile.am 2010-11-22 17:28:01 +0000
@@ -70,10 +70,10 @@
 check_PROGRAMS  =
 
 if HIP_UNITTESTS
-TESTS           += check_firewall \
-                   check_lib_core
-check_PROGRAMS  += check_firewall \
-                   check_lib_core
+TESTS           += test/check_firewall \
+                   test/check_lib_core
+check_PROGRAMS  += test/check_firewall \
+                   test/check_lib_core
 endif
 
 
@@ -196,14 +196,14 @@
 endif
 
 
-check_lib_core_SOURCES =    test/check_lib_core.c          \
-                            test/lib/core/hit.c            \
-                            test/lib/core/straddr.c
+test_check_firewall_SOURCES = test/check_firewall.c          \
+                              test/firewall/file_buffer.c    \
+                              test/firewall/line_parser.c    \
+                              test/firewall/port_bindings.c
 
-check_firewall_SOURCES =    test/check_firewall.c          \
-                            test/firewall/file_buffer.c    \
-                            test/firewall/line_parser.c    \
-                            test/firewall/port_bindings.c
+test_check_lib_core_SOURCES = test/check_lib_core.c          \
+                              test/lib/core/hit.c            \
+                              test/lib/core/straddr.c
 
 # Initialize LDADD lists empty, because modules might add entries to LDADD. The
 # module LDADDs need to be included before the standard LDADDs, because modules
@@ -220,11 +220,11 @@
 
 ### library dependencies ###
 
-check_lib_core_LDADD                     = lib/core/libhipcore.la
-check_firewall_LDADD                     = lib/core/libhipcore.la
 firewall_hipfw_LDADD                    += lib/core/libhipcore.la
 hipd_hipd_LDADD                         += lib/core/libhipcore.la
 test_auth_performance_LDADD              = lib/core/libhipcore.la
+test_check_firewall_LDADD                = lib/core/libhipcore.la
+test_check_lib_core_LDADD                = lib/core/libhipcore.la
 test_certteststub_LDADD                  = lib/core/libhipcore.la
 test_dh_performance_LDADD                = lib/core/libhipcore.la
 test_fw_port_bindings_performance_LDADD  = lib/core/libhipcore.la
@@ -247,7 +247,7 @@
              tools/hipdnsproxy/DNS/Type.py          \
              tools/hipdnsproxy/DNS/win32dns.py
 
-dnsdir = $(pyexecdir)/hipdnsproxy/DNS
+dnsdir = $(pythondir)/hipdnsproxy/DNS
 
 tools_hipdnskeyparse_PYTHON = tools/hipdnskeyparse/myasn.py
 
@@ -255,8 +255,8 @@
                            tools/hipdnsproxy/pyip6.py       \
                            tools/hipdnsproxy/util.py
 
-tools_hipdnskeyparsedir = $(pyexecdir)
-tools_hipdnsproxydir    = $(pyexecdir)
+tools_hipdnskeyparsedir = $(pythondir)
+tools_hipdnsproxydir    = $(pythondir)
 
 
 ### misc stuff ###

=== modified file 'configure.ac'
--- configure.ac        2010-11-12 16:25:40 +0000
+++ configure.ac        2010-11-19 22:13:31 +0000
@@ -246,6 +246,10 @@
 
 
 
-AC_CONFIG_FILES([ Makefile doc/Doxyfile doc/HOWTO.xml tools/nsupdate.pl 
tools/hipdnsproxy/hipdnsproxy ])
+AC_CONFIG_FILES([ Makefile
+                  doc/Doxyfile
+                  doc/HOWTO.xml
+                  tools/hipdnsproxy/hipdnsproxy
+                  tools/nsupdate.pl ])
 
 AC_OUTPUT

=== modified file 'firewall/esp_prot_conntrack.c'
--- firewall/esp_prot_conntrack.c       2010-11-15 13:38:47 +0000
+++ firewall/esp_prot_conntrack.c       2010-11-19 14:32:22 +0000
@@ -88,8 +88,7 @@
  * @param transform     TPA transform
  * @return              resolved transform, NULL for UNUSED transform
  */
-static esp_prot_conntrack_tfm_t *esp_prot_conntrack_resolve_transform(
-        const uint8_t transform)
+static esp_prot_conntrack_tfm_t *esp_prot_conntrack_resolve_transform(const 
uint8_t transform)
 {
     HIP_DEBUG("resolving transform: %u\n", transform);
 
@@ -137,10 +136,9 @@
  * @param   hash_length length of the anchor element
  * @return  esp state of the connection
  */
-static struct esp_tuple *esp_prot_conntrack_find_esp_tuple(
-        const struct tuple *tuple,
-        const unsigned char *active_anchor,
-        const int hash_length)
+static struct esp_tuple *esp_prot_conntrack_find_esp_tuple(const struct tuple 
*tuple,
+                                                           const unsigned char 
*active_anchor,
+                                                           const int 
hash_length)
 {
     struct esp_tuple *esp_tuple = NULL;
     SList *list                 = NULL;
@@ -424,9 +422,9 @@
  * @return  0 on success, -1 on error
  */
 static int esp_prot_conntrack_verify_branch(const struct tuple *tuple,
-        const struct esp_prot_anchor *esp_anchors[MAX_NUM_PARALLEL_HCHAINS],
-        const struct esp_prot_branch *esp_branches[MAX_NUM_PARALLEL_HCHAINS],
-        const struct esp_prot_secret *esp_secrets[MAX_NUM_PARALLEL_HCHAINS])
+                                            const struct esp_prot_anchor 
*esp_anchors[MAX_NUM_PARALLEL_HCHAINS],
+                                            const struct esp_prot_branch 
*esp_branches[MAX_NUM_PARALLEL_HCHAINS],
+                                            const struct esp_prot_secret 
*esp_secrets[MAX_NUM_PARALLEL_HCHAINS])
 {
     esp_prot_conntrack_tfm_t *conntrack_tfm = NULL;
     int hash_length                         = 0;
@@ -547,8 +545,8 @@
     int err = 0;
 
     // uninit all possible transforms
-    memset(esp_prot_conntrack_tfms, 0, MAX_NUM_TRANSFORMS
-           * sizeof(esp_prot_conntrack_tfm_t));
+    memset(esp_prot_conntrack_tfms, 0,
+           MAX_NUM_TRANSFORMS * sizeof(esp_prot_conntrack_tfm_t));
 
     return err;
 }
@@ -881,7 +879,8 @@
  * @param   tuple connection state of the connection tracking mechanism
  * @return  0 on success, -1 in case of an error or unsupported update
  */
-int esp_prot_conntrack_update(const hip_common_t *update, const struct tuple 
*tuple)
+int esp_prot_conntrack_update(const hip_common_t *update,
+                              const struct tuple *tuple)
 {
     const struct hip_tlv_common *param  = NULL;
     const struct hip_seq *seq           = NULL;
@@ -898,7 +897,7 @@
     HIP_ASSERT(tuple != NULL);
 
     memset(esp_anchors, 0, MAX_NUM_PARALLEL_HCHAINS * sizeof(struct 
esp_prot_anchor *));
-    memset(esp_roots, 0, MAX_NUM_PARALLEL_HCHAINS * sizeof(struct 
esp_prot_root *));
+    memset(esp_roots,   0, MAX_NUM_PARALLEL_HCHAINS * sizeof(struct 
esp_prot_root *));
 
     seq      = hip_get_param(update, HIP_PARAM_SEQ);
     esp_info = hip_get_param(update, HIP_PARAM_ESP_INFO);
@@ -1148,8 +1147,10 @@
                                                           
conntrack_tfm->hash_length, esp_tuple->hash_tree_depth,
                                                           
&esp_tuple->active_anchors[active_hchain][0],
                                                           
&esp_tuple->next_anchors[active_hchain][0],
-                                                          
esp_tuple->active_roots[active_hchain], esp_tuple->active_root_length,
-                                                          
esp_tuple->next_roots[active_hchain], 
esp_tuple->next_root_length[active_hchain],
+                                                          
esp_tuple->active_roots[active_hchain],
+                                                          
esp_tuple->active_root_length,
+                                                          
esp_tuple->next_roots[active_hchain],
+                                                          
esp_tuple->next_root_length[active_hchain],
                                                           ((unsigned char *) 
esp) + sizeof(struct hip_esp))) < 0, -1,
                      "failed to verify ESP protection hash\n");
         } else {
@@ -1167,8 +1168,11 @@
                                                                
&esp_tuple->active_anchors[active_hchain][0],
                                                                
&esp_tuple->next_anchors[active_hchain][0],
                                                                ((unsigned char 
*) esp) + sizeof(struct hip_esp),
-                                                               num_verify, 
esp_tuple->active_roots[active_hchain], esp_tuple->active_root_length,
-                                                               
esp_tuple->next_roots[active_hchain], 
esp_tuple->next_root_length[active_hchain])) < 0, -1,
+                                                               num_verify,
+                                                               
esp_tuple->active_roots[active_hchain],
+                                                               
esp_tuple->active_root_length,
+                                                               
esp_tuple->next_roots[active_hchain],
+                                                               
esp_tuple->next_root_length[active_hchain])) < 0, -1,
                          "failed to verify ESP protection hash\n");
             } else if ((esp_tuple->esp_prot_tfm == ESP_PROT_TFM_CUMULATIVE
                         || esp_tuple->esp_prot_tfm == ESP_PROT_TFM_PARA_CUMUL)
@@ -1218,7 +1222,8 @@
 
                     // keep the buffer filled with fresh elements only
                     if (cumulative_ptr[i].seq > 
esp_tuple->hash_buffer[cumulative_ptr[i].seq % ring_buffer_size].seq) {
-                        memcpy(&esp_tuple->hash_buffer[cumulative_ptr[i].seq % 
ring_buffer_size], &cumulative_ptr[i],
+                        memcpy(&esp_tuple->hash_buffer[cumulative_ptr[i].seq % 
ring_buffer_size],
+                               &cumulative_ptr[i],
                                sizeof(esp_cumulative_item_t));
 
                         HIP_DEBUG("cached cumulative token with SEQ: %u\n", 
cumulative_ptr[i].seq);

=== modified file 'lib/core/prefix.c'
--- lib/core/prefix.c   2010-11-15 13:39:24 +0000
+++ lib/core/prefix.c   2010-11-19 14:32:22 +0000
@@ -381,23 +381,23 @@
     return IS_IPV4_LOOPBACK(addr_in.s_addr);
 }
 
-int ipv4_addr_cmp(const struct in_addr *a1,
-                                const struct in_addr *a2) {
+int ipv4_addr_cmp(const struct in_addr *a1, const struct in_addr *a2)
+{
     return memcmp(a1, a2, sizeof(struct in_addr));
 }
 
-void ipv4_addr_copy(struct in_addr *a1,
-                                  const struct in_addr *a2) {
+void ipv4_addr_copy(struct in_addr *a1, const struct in_addr *a2)
+{
     memcpy(a1, a2, sizeof(struct in_addr));
 }
 
-int ipv6_addr_cmp(const struct in6_addr *a1,
-                  const struct in6_addr *a2) {
+int ipv6_addr_cmp(const struct in6_addr *a1, const struct in6_addr *a2)
+{
     return memcmp(a1, a2, sizeof(struct in6_addr));
 }
 
-void ipv6_addr_copy(struct in6_addr *a1,
-               const struct in6_addr *a2) {
+void ipv6_addr_copy(struct in6_addr *a1, const struct in6_addr *a2)
+{
     memcpy(a1, a2, sizeof(struct in6_addr));
 }
 
@@ -409,7 +409,8 @@
 }
 
 void hip_copy_in6addr_null_check(struct in6_addr *to,
-                                 const struct in6_addr *from) {
+                                 const struct in6_addr *from)
+{
     HIP_ASSERT(to);
     if (from) {
         ipv6_addr_copy(to, from);
@@ -418,8 +419,8 @@
     }
 }
 
-void hip_copy_inaddr_null_check(struct in_addr *to,
-                                const struct in_addr *from) {
+void hip_copy_inaddr_null_check(struct in_addr *to, const struct in_addr *from)
+{
     HIP_ASSERT(to);
     if (from) {
         memcpy(to, from, sizeof(*to));

=== modified file 'modules/heartbeat/hipd/heartbeat.c'
--- modules/heartbeat/hipd/heartbeat.c  2010-11-12 16:42:54 +0000
+++ modules/heartbeat/hipd/heartbeat.c  2010-11-22 18:30:04 +0000
@@ -1,6 +1,4 @@
-/**
- * @file
- *
+/*
  * Copyright (c) 2010 Aalto University and RWTH Aachen University.
  *
  * Permission is hereby granted, free of charge, to any person
@@ -23,6 +21,10 @@
  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * @file
  *
  * Heartbeat code detects problems with the ESP tunnel. It is based on
  * sending ICMPv6 requests inside the tunnel. Each received ICMPv6

=== modified file 'modules/heartbeat/hipd/heartbeat.h'
--- modules/heartbeat/hipd/heartbeat.h  2010-09-25 18:30:26 +0000
+++ modules/heartbeat/hipd/heartbeat.h  2010-11-22 18:30:04 +0000
@@ -1,6 +1,4 @@
-/**
- * @file
- *
+/*
  * Copyright (c) 2010 Aalto University and RWTH Aachen University.
  *
  * Permission is hereby granted, free of charge, to any person
@@ -25,9 +23,9 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifndef HIP_HIPD_HEARTBEAT_H
-#define HIP_HIPD_HEARTBEAT_H
+#ifndef HIP_MODULES_HEARTBEAT_HIPD_HEARTBEAT_H
+#define HIP_MODULES_HEARTBEAT_HIPD_HEARTBEAT_H
 
 int hip_heartbeat_init(void);
 
-#endif /* HIP_HIPD_HEARTBEAT_H */
+#endif /* HIP_MODULES_HEARTBEAT_HIPD_HEARTBEAT_H */

=== modified file 'modules/heartbeat_update/hipd/hb_update.c'
--- modules/heartbeat_update/hipd/hb_update.c   2010-09-25 18:30:26 +0000
+++ modules/heartbeat_update/hipd/hb_update.c   2010-11-22 18:30:04 +0000
@@ -1,6 +1,4 @@
-/**
- * @file
- *
+/*
  * Copyright (c) 2010 Aalto University and RWTH Aachen University.
  *
  * Permission is hereby granted, free of charge, to any person
@@ -23,6 +21,10 @@
  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * @file
  *
  * This is the main source file of the module HEARTBEAT-UPDATE. Its core
  * functionality is UPDATE triggering if HEARTBEATS fail. You can adjust the

=== modified file 'modules/heartbeat_update/hipd/hb_update.h'
--- modules/heartbeat_update/hipd/hb_update.h   2010-09-25 18:30:26 +0000
+++ modules/heartbeat_update/hipd/hb_update.h   2010-11-22 18:30:04 +0000
@@ -1,6 +1,4 @@
-/**
- * @file
- *
+/*
  * Copyright (c) 2010 Aalto University and RWTH Aachen University.
  *
  * Permission is hereby granted, free of charge, to any person
@@ -24,9 +22,10 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  * OTHER DEALINGS IN THE SOFTWARE.
  */
-#ifndef HIP_MODULES_HEARTBEAT_UPDATE_H
-#define HIP_MODULES_HEARTBEAT_UPDATE_H
+
+#ifndef HIP_MODULES_HEARTBEAT_UPDATE_HIPD_HB_UPDATE_H
+#define HIP_MODULES_HEARTBEAT_UPDATE_HIPD_HB_UPDATE_H
 
 int hip_hb_update_init(void);
 
-#endif /* HIP_MODULES_HEARTBEAT_UPDATE_H */
+#endif /* HIP_MODULES_HEARTBEAT_UPDATE_HIPD_HB_UPDATE_H */

=== modified file 'modules/update/hipd/update.c'
--- modules/update/hipd/update.c        2010-11-23 14:38:13 +0000
+++ modules/update/hipd/update.c        2010-11-23 14:50:25 +0000
@@ -1,8 +1,4 @@
-/**
- * @file
- * This file defines various functions for sending, handling and receiving
- * UPDATE packets for the Host Identity Protocol (HIP)
- *
+/*
  * Copyright (c) 2010 Aalto University and RWTH Aachen University.
  *
  * Permission is hereby granted, free of charge, to any person
@@ -25,6 +21,12 @@
  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * @file
+ * This file defines various functions for sending, handling and receiving
+ * UPDATE packets for the Host Identity Protocol (HIP)
  *
  * @author  Baris Boyvat <baris#boyvat.com>
  */

=== modified file 'modules/update/hipd/update.h'
--- modules/update/hipd/update.h        2010-11-23 14:38:13 +0000
+++ modules/update/hipd/update.h        2010-11-23 14:50:25 +0000
@@ -30,8 +30,8 @@
  * @date    3.5.2009
  */
 
-#ifndef HIP_HIPD_UPDATE_H
-#define HIP_HIPD_UPDATE_H
+#ifndef HIP_MODULES_HIPD_UPDATE_LEGACY_H
+#define HIP_MODULES_HIPD_UPDATE_LEGACY_H
 
 #include <stdint.h>
 #include <netinet/in.h>
@@ -110,4 +110,4 @@
 
 int hip_update_init(void);
 
-#endif /* HIP_HIPD_UPDATE_H */
+#endif /* HIP_MODULES_HIPD_UPDATE_LEGACY_H */

=== modified file 'modules/update/hipd/update_legacy.c'
--- modules/update/hipd/update_legacy.c 2010-11-22 14:27:43 +0000
+++ modules/update/hipd/update_legacy.c 2010-11-23 14:50:25 +0000
@@ -1,5 +1,4 @@
-/**
- * @file
+/*
  * Copyright (c) 2010 Aalto University and RWTH Aachen University.
  *
  * Permission is hereby granted, free of charge, to any person
@@ -22,7 +21,10 @@
  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  * OTHER DEALINGS IN THE SOFTWARE.
- *
+ */
+
+/**
+ * @file
  * This file contains legacy functions for mobility that should be rewritten 
for modularity.
  * They are still included in the code base due to locator dependencies with
  * base exchange code. See bugzilla ids 592195 and 592196.

=== modified file 'modules/update/hipd/update_legacy.h'
--- modules/update/hipd/update_legacy.h 2010-09-25 18:30:26 +0000
+++ modules/update/hipd/update_legacy.h 2010-11-22 18:30:04 +0000
@@ -1,6 +1,4 @@
-/**
- * @file
- *
+/*
  * Copyright (c) 2010 Aalto University and RWTH Aachen University.
  *
  * Permission is hereby granted, free of charge, to any person
@@ -25,8 +23,8 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifndef HIP_HIPD_UPDATE_LEGACY_H
-#define HIP_HIPD_UPDATE_LEGACY_H
+#ifndef HIP_MODULES_UPDATE_HIPD_UPDATE_H
+#define HIP_MODULES_UPDATE_HIPD_UPDATE_H
 
 #include "lib/core/protodefs.h"
 
@@ -34,4 +32,4 @@
 
 void hip_empty_oppipdb_old(void);
 
-#endif /* HIP_HIPD_UPDATE_LEGACY_H */
+#endif /* HIP_MODULES_UPDATE_HIPD_UPDATE_H */

=== modified file 'packaging/hipl-deb.spec'
--- packaging/hipl-deb.spec     2010-11-16 13:18:03 +0000
+++ packaging/hipl-deb.spec     2010-11-19 14:43:35 +0000
@@ -83,6 +83,7 @@
 
 %package daemon
 Requires: hipl-lib, libnet-ip-perl, libnet-dns-perl, libsocket6-perl, 
libio-socket-inet6-perl
+Obsoletes: tools
 Summary: HIP for Linux IPsec key management and mobility daemon
 Group: System Environment/Kernel
 %description daemon

=== modified file 'test/lib/core/hit.c'
--- test/lib/core/hit.c 2010-10-27 07:10:27 +0000
+++ test/lib/core/hit.c 2010-11-22 18:21:46 +0000
@@ -27,10 +27,12 @@
  * @file
  * @author Stefan Goetz <stefan.goetz@xxxxxxxxxxxxxxxxx>
  */
+
 #include <check.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
+
 #include "lib/core/hit.h"
 
 START_TEST(test_hip_convert_hit_to_str_valid)

=== modified file 'test/lib/core/straddr.c'
--- test/lib/core/straddr.c     2010-10-19 12:01:36 +0000
+++ test/lib/core/straddr.c     2010-11-22 18:21:46 +0000
@@ -27,8 +27,10 @@
  * @file
  * @author Stefan Goetz <stefan.goetz@xxxxxxxxxxxxxxxxx>
  */
+
 #include <check.h>
-#include <stdlib.h> // free()
+#include <stdlib.h>
+
 #include "lib/core/straddr.h"
 
 START_TEST(test_hip_in6_ntop_valid)

Other related posts:

  • » [hipl-dev] [Branch ~hipl-core/hipl/mobility-fixes] Rev 5184: merged lp:hipl revision 5173 - noreply