[hipl-commit] [trunk] Rev 4586: Fixed failures in hipd start up.

  • From: Miika Komu <miika@xxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Mon, 24 May 2010 19:49:40 +0300

Committer: Miika Komu <miika@xxxxxx>
Date: 24/05/2010 at 19:49:40
Revision: 4586
Revision-id: miika@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Fixed failures in hipd start up.
  
  Hipd failed to start because the return values of socket initialization 
  were not interpreted correctly. Fixed.

Modified:
  M  hipd/init.c

=== modified file 'hipd/init.c'
--- hipd/init.c 2010-05-24 16:45:32 +0000
+++ hipd/init.c 2010-05-24 16:50:43 +0000
@@ -954,10 +954,10 @@
     hip_xfrm_set_nl_ipsec(&hip_nl_ipsec);
 
     hip_raw_sock_output_v6  = hip_init_raw_sock_v6(IPPROTO_HIP);
-    HIP_IFEL(hip_raw_sock_output_v6, -1, "raw sock output v6\n");
+    HIP_IFEL((hip_raw_sock_output_v6 == -1), -1, "raw sock output v6\n");
 
     hip_raw_sock_output_v4  = hip_init_raw_sock_v4(IPPROTO_HIP);
-    HIP_IFEL(hip_raw_sock_output_v4, -1, "raw sock output v4\n");
+    HIP_IFEL((hip_raw_sock_output_v4 == -1), -1, "raw sock output v4\n");
 
     /* hip_nat_sock_input should be initialized after hip_nat_sock_output
        because for the sockets bound to the same address/port, only the last 
socket seems
@@ -966,13 +966,13 @@
        extension (sending packets from multiple source addresses). */
 
     hip_nat_sock_output_udp = hip_init_raw_sock_v4(IPPROTO_UDP);
-    HIP_IFEL(hip_nat_sock_output_udp, -1, "raw sock output udp\n");
+    HIP_IFEL((hip_nat_sock_output_udp == -1), -1, "raw sock output udp\n");
 
     hip_raw_sock_input_v6   = hip_init_raw_sock_v6(IPPROTO_HIP);
-    HIP_IFEL(hip_raw_sock_input_v6, -1, "raw sock input v6\n");
+    HIP_IFEL((hip_raw_sock_input_v6 == -1), -1, "raw sock input v6\n");
 
     hip_raw_sock_input_v4   = hip_init_raw_sock_v4(IPPROTO_HIP);
-    HIP_IFEL(hip_raw_sock_input_v4, -1, "raw sock input v4\n");
+    HIP_IFEL((hip_raw_sock_input_v4 == -1), -1, "raw sock input v4\n");
 
     HIP_IFEL(hip_create_nat_sock_udp(&hip_nat_sock_input_udp, 0, 0), -1, "raw 
sock input udp\n");
     HIP_IFEL(hip_init_icmp_v6(&hip_icmp_sock), -1, "icmpv6 sock\n");

Other related posts:

  • » [hipl-commit] [trunk] Rev 4586: Fixed failures in hipd start up. - Miika Komu