- adding return value to mst callback
authorMatthias Wachs <wachs@net.in.tum.de>
Thu, 24 May 2012 09:35:37 +0000 (09:35 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Thu, 24 May 2012 09:35:37 +0000 (09:35 +0000)
15 files changed:
src/core/gnunet-service-core_clients.c
src/core/gnunet-service-core_kx.c
src/dns/gnunet-service-dns.c
src/dv/gnunet-service-dv.c
src/exit/gnunet-daemon-exit.c
src/fs/fs_dirmetascan.c
src/statistics/gnunet-service-statistics.c
src/transport/gnunet-helper-transport-wlan-dummy.c
src/transport/gnunet-service-transport.c
src/transport/plugin_transport_http_client.c
src/transport/plugin_transport_http_server.c
src/transport/plugin_transport_udp.c
src/transport/plugin_transport_udp_broadcasting.c
src/transport/plugin_transport_wlan.c
src/vpn/gnunet-service-vpn.c

index 2c603d217cc98e3cade728fcbb3dcdeb9d0a28d6..1076f343f2ee5e879428c4b80c4e7597f86ad76a 100644 (file)
@@ -506,7 +506,7 @@ handle_client_send (void *cls, struct GNUNET_SERVER_Client *client,
  * @param client reservation request ('struct GSC_ClientActiveRequest')
  * @param message the actual message
  */
-static void
+static int
 client_tokenizer_callback (void *cls, void *client,
                            const struct GNUNET_MessageHeader *message)
 {
@@ -546,6 +546,7 @@ client_tokenizer_callback (void *cls, void *client,
                                 GNUNET_CORE_OPTION_SEND_HDR_OUTBOUND);  
     GSC_SESSIONS_transmit (car, message, tc->cork);
   }
+  return GNUNET_OK;
 }
 
 
index 81c3382af4f41c338b36189589c6f4c6090ba060..1fce2e528dceb4f04990208b335c4b19287ba1e9 100644 (file)
@@ -1658,7 +1658,7 @@ GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx,
  * @param client who sent us the message (struct GSC_KeyExchangeInfo)
  * @param m the message
  */
-static void
+static int
 deliver_message (void *cls, void *client, const struct GNUNET_MessageHeader *m)
 {
   struct DeliverMessageContext *dmc = client;
@@ -1668,7 +1668,7 @@ deliver_message (void *cls, void *client, const struct GNUNET_MessageHeader *m)
   case GNUNET_MESSAGE_TYPE_CORE_BINARY_TYPE_MAP:
   case GNUNET_MESSAGE_TYPE_CORE_COMPRESSED_TYPE_MAP:
     GSC_SESSIONS_set_typemap (dmc->peer, m);
-    return;
+    return GNUNET_OK;
   default:
     GSC_CLIENTS_deliver_message (dmc->peer, dmc->atsi, dmc->atsi_count, m,
                                  ntohs (m->size),
@@ -1677,6 +1677,7 @@ deliver_message (void *cls, void *client, const struct GNUNET_MessageHeader *m)
                                  sizeof (struct GNUNET_MessageHeader),
                                  GNUNET_CORE_OPTION_SEND_HDR_INBOUND);
   }
+  return GNUNET_OK;
 }
 
 
index 173fd24e83f1c4f7530c5657a4ff592564e1464a..6337538d10a9a8f83886772df29a606c38e7634c 100644 (file)
@@ -1239,7 +1239,7 @@ handle_client_response (void *cls GNUNET_UNUSED,
  * @param client identification of the client
  * @param message the actual message, a DNS request we should handle
  */
-static void
+static int
 process_helper_messages (void *cls GNUNET_UNUSED, void *client,
                         const struct GNUNET_MessageHeader *message)
 {
@@ -1260,7 +1260,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
   {
     /* non-IP packet received on TUN!? */
     GNUNET_break (0);
-    return;
+    return GNUNET_OK;
   }
   msize -= sizeof (struct GNUNET_MessageHeader);
   tun = (const struct GNUNET_TUN_Layer2PacketHeader *) &message[1];
@@ -1279,7 +1279,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
       /* non-IP/UDP packet received on TUN (or with options) */
       GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                  _("Received malformed IPv4-UDP packet on TUN interface.\n"));
-      return;
+      return GNUNET_OK;
     }
     udp = (const struct GNUNET_TUN_UdpHeader*) &ip4[1];
     msize -= sizeof (struct GNUNET_TUN_IPv4Header);
@@ -1295,7 +1295,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
       /* non-IP/UDP packet received on TUN (or with extensions) */
       GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                  _("Received malformed IPv6-UDP packet on TUN interface.\n"));
-      return;
+      return GNUNET_OK;
     }
     udp = (const struct GNUNET_TUN_UdpHeader*) &ip6[1];
     msize -= sizeof (struct GNUNET_TUN_IPv6Header);
@@ -1306,7 +1306,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
                _("Got non-IP packet with %u bytes and protocol %u from TUN\n"),
                (unsigned int) msize,
                ntohs (tun->proto));
-    return;
+    return GNUNET_OK;
   }
   if (msize <= sizeof (struct GNUNET_TUN_UdpHeader) + sizeof (struct GNUNET_TUN_DnsHeader))
   {    
@@ -1314,7 +1314,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
     GNUNET_STATISTICS_update (stats,
                              gettext_noop ("# Non-DNS UDP packet received via TUN interface"),
                              1, GNUNET_NO);
-    return;
+    return GNUNET_OK;
   }
   msize -= sizeof (struct GNUNET_TUN_UdpHeader);
   dns = (const struct GNUNET_TUN_DnsHeader*) &udp[1];
@@ -1381,6 +1381,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
                            1, GNUNET_NO);
   /* start request processing state machine */
   next_phase (rr);
+  return GNUNET_OK;
 }
 
 
index 50aac09cde13c96f73133aa6dc77867d62d467e7..651b92ac03014605088a7b48cc1417b1a36a7cba 100644 (file)
@@ -1288,7 +1288,7 @@ checkPeerID (void *cls, const GNUNET_HashCode * key, void *value)
  * @param client the TokenizedMessageContext which contains message information
  * @param message the actual message
  */
-void
+int
 tokenized_message_handler (void *cls, void *client,
                            const struct GNUNET_MessageHeader *message)
 {
@@ -1312,6 +1312,7 @@ tokenized_message_handler (void *cls, void *client,
     send_to_plugin (ctx->peer, message, ntohs (message->size),
                     &ctx->distant->identity, ctx->distant->cost);
   }
+  return GNUNET_OK;
 }
 
 #if DELAY_FORWARDS
index e58611cc62b37fd68fc1981b2b9afa3f90281722..26f3e7536901831699be272a67e0e31f82a54020 100644 (file)
@@ -953,7 +953,7 @@ tcp_from_helper (const struct GNUNET_TUN_TcpHeader *tcp,
  * @param client unsued
  * @param message message received from helper
  */
-static void
+static int
 message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
                const struct GNUNET_MessageHeader *message)
 {
@@ -970,13 +970,13 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
   if (ntohs (message->type) != GNUNET_MESSAGE_TYPE_VPN_HELPER)
   {
     GNUNET_break (0);
-    return;
+    return GNUNET_OK;
   }
   size = ntohs (message->size);
   if (size < sizeof (struct GNUNET_TUN_Layer2PacketHeader) + sizeof (struct GNUNET_MessageHeader))
   {
     GNUNET_break (0);
-    return;
+    return GNUNET_OK;
   }
   GNUNET_STATISTICS_update (stats,
                            gettext_noop ("# Bytes received from TUN"),
@@ -993,20 +993,20 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
       {
        /* Kernel to blame? */
        GNUNET_break (0);
-       return;
+        return GNUNET_OK;
       }
       pkt4 = (const struct GNUNET_TUN_IPv4Header *) &pkt_tun[1];
       if (size != ntohs (pkt4->total_length))
       {
        /* Kernel to blame? */
        GNUNET_break (0);
-       return;
+        return GNUNET_OK;
       }
       if (pkt4->header_length * 4 != sizeof (struct GNUNET_TUN_IPv4Header))
       {
        GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                    _("IPv4 packet options received.  Ignored.\n"));
-       return;
+        return GNUNET_OK;
       }
       
       size -= sizeof (struct GNUNET_TUN_IPv4Header);
@@ -1034,7 +1034,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
        GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                    _("IPv4 packet with unsupported next header %u received.  Ignored.\n"),
                    (int) pkt4->protocol);
-       return;
+        return GNUNET_OK;
       }
     }
     break;
@@ -1046,14 +1046,14 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
       {
        /* Kernel to blame? */
        GNUNET_break (0);
-       return;
+        return GNUNET_OK;
       }
       pkt6 = (struct GNUNET_TUN_IPv6Header *) &pkt_tun[1];
       if (size != ntohs (pkt6->payload_length) + sizeof (struct GNUNET_TUN_IPv6Header))
       {
        /* Kernel to blame? */
        GNUNET_break (0);
-       return;
+        return GNUNET_OK;
       }
       size -= sizeof (struct GNUNET_TUN_IPv6Header);
       switch (pkt6->next_header)
@@ -1080,7 +1080,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
        GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                    _("IPv6 packet with unsupported next header %d received.  Ignored.\n"),
                     pkt6->next_header);
-       return;
+        return GNUNET_OK;
       }
     }
     break;
@@ -1090,6 +1090,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
                ntohs (pkt_tun->proto));
     break;
   }
+  return GNUNET_OK;
 }
 
 
index 2c6d914abcf50c68f4c4bab8e6e3a72d38b7a198..7d322e0d72ec99fef0d9ddc3affbca52961ee218 100644 (file)
@@ -248,7 +248,7 @@ finish_scan (void *cls,
  * @param client always NULL
  * @param msg message from the helper process
  */
-static void
+static int
 process_helper_msgs (void *cls, 
                     void *client,
                     const struct GNUNET_MessageHeader *msg)
@@ -281,7 +281,7 @@ process_helper_msgs (void *cls,
     else
       (void) expand_tree (ds->pos,
                          filename, GNUNET_NO);
-    return;
+    return GNUNET_OK;
   case GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_DIRECTORY:
     if (filename[left-1] != '\0')
     {
@@ -296,7 +296,7 @@ process_helper_msgs (void *cls,
        break;
       }
       ds->pos = ds->pos->parent;
-      return;
+      return GNUNET_OK;
     }
     ds->progress_callback (ds->progress_callback_cls, 
                           filename, GNUNET_YES,
@@ -305,7 +305,7 @@ process_helper_msgs (void *cls,
                           filename, GNUNET_YES);
     if (NULL == ds->toplevel)
       ds->toplevel = ds->pos;
-    return;
+    return GNUNET_OK;
   case GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR:
     break;
   case GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_SKIP_FILE:
@@ -314,7 +314,7 @@ process_helper_msgs (void *cls,
     ds->progress_callback (ds->progress_callback_cls, 
                           filename, GNUNET_SYSERR,
                           GNUNET_FS_DIRSCANNER_FILE_IGNORED);
-    return;
+    return GNUNET_OK;
   case GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_COUNTING_DONE:
     if (0 != left)
     {
@@ -332,7 +332,7 @@ process_helper_msgs (void *cls,
     ds->pos = ds->toplevel;
     if (GNUNET_YES == ds->pos->is_directory)
       ds->pos = advance (ds->pos);
-    return;
+    return GNUNET_OK;
   case GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_META_DATA:
     {
       size_t nlen;
@@ -382,7 +382,7 @@ process_helper_msgs (void *cls,
       }
       ds->pos->ksk_uri = GNUNET_FS_uri_ksk_create_from_meta_data (ds->pos->meta);
       ds->pos = advance (ds->pos);      
-      return;
+      return GNUNET_OK;
     }
   case GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_FINISHED:
     if (NULL != ds->pos)
@@ -402,7 +402,7 @@ process_helper_msgs (void *cls,
     }
     ds->stop_task = GNUNET_SCHEDULER_add_now (&finish_scan,
                                              ds);
-    return;
+    return GNUNET_OK;
   default:
     GNUNET_break (0);
     break;
@@ -410,6 +410,7 @@ process_helper_msgs (void *cls,
   ds->progress_callback (ds->progress_callback_cls, 
                         NULL, GNUNET_SYSERR,
                         GNUNET_FS_DIRSCANNER_INTERNAL_ERROR);
+  return GNUNET_OK;
 }
 
 
index 5cced142698021a4be3fbb5774d9628cd1f4d397..efd8346245e1d911f5fec6cdc499d972a5b344ae 100644 (file)
@@ -214,12 +214,13 @@ static int in_shutdown;
  * @param client unused
  * @param msg message to inject
  */
-static void
+static int
 inject_message (void *cls, void *client, const struct GNUNET_MessageHeader *msg)
 {
   struct GNUNET_SERVER_Handle *server = cls;
 
   GNUNET_break (GNUNET_OK == GNUNET_SERVER_inject (server, NULL, msg));
+  return GNUNET_OK;
 }
 
 
index 9d82fccf3827750e370b01fcc70bae57f33536fa..a7015ac2c1ed8f38ac664f6d29caa96929fd00fc 100644 (file)
@@ -119,7 +119,7 @@ send_mac_to_plugin (char *buffer, struct GNUNET_TRANSPORT_WLAN_MacAddress *mac)
  * @param client unused
  * @param hdr inbound message from the FIFO
  */
-static void
+static int
 stdin_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
 {
   struct SendBuffer *write_pout = cls;
@@ -154,6 +154,7 @@ stdin_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
          &in[1],
          payload_size);
   write_pout->size += payload_size;
+  return GNUNET_OK;
 }
 
 
@@ -164,7 +165,7 @@ stdin_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
  * @param client unused
  * @param hdr the message we received to copy to the buffer
  */
-static void
+static int
 file_in_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
 {
   struct SendBuffer *write_std = cls;
@@ -178,6 +179,7 @@ file_in_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
   }
   memcpy (write_std->buf + write_std->size, hdr, sendsize);
   write_std->size += sendsize;
+  return GNUNET_OK;
 }
 
 
index 93fd0d685acd7957c6290e003da48c16c890b73b..9a1d86ffe3a1f7c5631ce06ef1eff9c1588091f5 100644 (file)
@@ -230,7 +230,7 @@ plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
   if (NULL == message)
     goto end;
   type = ntohs (message->type);
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received Message with type %u from peer `%s'\n", type, GNUNET_i2s (peer));
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Received Message with type %u from peer `%s'\n", type, GNUNET_i2s (peer));
 
   GNUNET_STATISTICS_update (GST_stats,
                         gettext_noop
index cf21a425a67f1f1ba383830ceb2638fe6d2b8ea9..79f70bb6c61d63396d9f2186ce250fe0a420416d 100644 (file)
@@ -333,7 +333,7 @@ client_disconnect (struct Session *s)
   return res;
 }
 
-static void
+static int
 client_receive_mst_cb (void *cls, void *client,
                        const struct GNUNET_MessageHeader *message)
 {
@@ -343,7 +343,7 @@ client_receive_mst_cb (void *cls, void *client,
   if (GNUNET_YES != exist_session(p, s))
   {
     GNUNET_break (0);
-    return;
+    return GNUNET_OK;
   }
 
   delay = http_plugin_receive (s, &s->target, message, s, s->addr, s->addrlen);
@@ -359,6 +359,7 @@ client_receive_mst_cb (void *cls, void *client,
                      GNUNET_i2s (&s->target), GNUNET_a2s (s->addr, s->addrlen),
                      delay);
   }
+  return GNUNET_OK;
 }
 
 static void
index 00ad005bd52931a8813f241ffe4c61cf946c4e93..c49e4953a3f5e41adfbf11b42ed2e0f2530148ec 100644 (file)
@@ -273,7 +273,7 @@ server_reschedule (struct Plugin *plugin, struct MHD_Daemon *server, int now)
  * @param client clien
  * @param message the message to be forwarded to transport service
  */
-static void
+static int
 server_receive_mst_cb (void *cls, void *client,
                        const struct GNUNET_MessageHeader *message)
 {
@@ -281,7 +281,7 @@ server_receive_mst_cb (void *cls, void *client,
 
   GNUNET_assert (NULL != p);
   if (GNUNET_NO == exist_session(p, s))
-    return;
+    return GNUNET_OK;
 
   struct Plugin *plugin = s->plugin;
   struct GNUNET_TIME_Relative delay;
@@ -299,6 +299,7 @@ server_receive_mst_cb (void *cls, void *client,
                      http_plugin_address_to_string (NULL, s->addr, s->addrlen),
                      delay);
   }
+  return GNUNET_OK;
 }
 
 /**
index 86af69fc84bf6ff64ec4e93c9bb1f8c3b0e577f3..60814327cf8cbfb33c8db5f954cec3154fa5e2ef 100644 (file)
@@ -1263,7 +1263,7 @@ udp_nat_port_map_callback (void *cls, int add_remove,
  * @param client the 'struct SourceInformation'
  * @param hdr the actual message
  */
-static void
+static int
 process_inbound_tokenized_messages (void *cls, void *client,
                                     const struct GNUNET_MessageHeader *hdr)
 {
@@ -1274,7 +1274,7 @@ process_inbound_tokenized_messages (void *cls, void *client,
 
   GNUNET_assert (si->session != NULL);
   if (GNUNET_YES == si->session->in_destroy)
-    return
+    return GNUNET_OK;
   /* setup ATS */
   ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
   ats[0].value = htonl (1);
@@ -1289,6 +1289,7 @@ process_inbound_tokenized_messages (void *cls, void *client,
                 si->arg,
                 si->args);
   si->session->flow_delay_for_other_peer = delay;
+  return GNUNET_OK;
 }
 
 
index 2935d8da390adc74a8227564254f2a2128391dca..baabf45ea391ff625ea1a33f4427edbcfb0b3363 100644 (file)
@@ -90,7 +90,7 @@ struct Mstv6Context
 
 
 
-void
+int
 broadcast_ipv6_mst_cb (void *cls, void *client,
                        const struct GNUNET_MessageHeader *message)
 {
@@ -104,7 +104,7 @@ broadcast_ipv6_mst_cb (void *cls, void *client,
 
   if (GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON !=
       ntohs (msg->header.type))
-    return;
+    return GNUNET_OK;
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Received beacon with %u bytes from peer `%s' via address `%s'\n",
        ntohs (msg->header.size), GNUNET_i2s (&msg->sender),
@@ -128,9 +128,10 @@ broadcast_ipv6_mst_cb (void *cls, void *client,
                             ("# IPv6 multicast HELLO beacons received via udp"),
                             1, GNUNET_NO);
   GNUNET_free (mc);
+  return GNUNET_OK;
 }
 
-void
+int
 broadcast_ipv4_mst_cb (void *cls, void *client,
                        const struct GNUNET_MessageHeader *message)
 {
@@ -143,7 +144,7 @@ broadcast_ipv4_mst_cb (void *cls, void *client,
 
   if (GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON !=
       ntohs (msg->header.type))
-    return;
+    return GNUNET_OK;
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Received beacon with %u bytes from peer `%s' via address `%s'\n",
        ntohs (msg->header.size), GNUNET_i2s (&msg->sender),
@@ -168,6 +169,7 @@ broadcast_ipv4_mst_cb (void *cls, void *client,
                             ("# IPv4 broadcast HELLO beacons received via udp"),
                             1, GNUNET_NO);
   GNUNET_free (mc);
+  return GNUNET_OK;
 }
 
 void
index bda17cb9014ef50b6b0985b25c68dbc38be09810..aed4b22861c88bb33ea7d2011468f27174c2731b 100644 (file)
@@ -1081,7 +1081,7 @@ wlan_plugin_send (void *cls,
  * @param client pointer to the session this message belongs to
  * @param hdr start of the message
  */
-static void
+static int
 process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
 {
   struct Plugin *plugin = cls;
@@ -1245,6 +1245,7 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
                          (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress));
     break;
   }
+  return GNUNET_OK;
 }
 #undef NUM_ATS
 
@@ -1256,7 +1257,7 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
  * @param client client that send the data (not used)
  * @param hdr header of the GNUNET_MessageHeader
  */
-static void
+static int
 handle_helper_message (void *cls, void *client,
                       const struct GNUNET_MessageHeader *hdr)
 {
@@ -1358,6 +1359,7 @@ handle_helper_message (void *cls, void *client,
         ntohs (hdr->type), ntohs (hdr->size));
     break;
   }
+  return GNUNET_OK;
 }
 
 
index 5cd63690070c396c7b335b6366470d097c152981..324671b0c1d08507afb8a305c7f449589f95d150 100644 (file)
@@ -1504,7 +1504,7 @@ route_packet (struct DestinationEntry *destination,
  * @param client NULL
  * @param message message we got from the client (VPN tunnel interface)
  */
-static void
+static int
 message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
                const struct GNUNET_MessageHeader *message)
 {
@@ -1521,7 +1521,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
        (mlen < sizeof (struct GNUNET_MessageHeader) + sizeof (struct GNUNET_TUN_Layer2PacketHeader)) )
   {
     GNUNET_break (0);
-    return;
+    return GNUNET_OK;
   }
   tun = (const struct GNUNET_TUN_Layer2PacketHeader *) &message[1];
   mlen -= (sizeof (struct GNUNET_MessageHeader) + sizeof (struct GNUNET_TUN_Layer2PacketHeader));
@@ -1535,7 +1535,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
       {
        /* blame kernel */
        GNUNET_break (0);
-       return;
+        return GNUNET_OK;
       }
       pkt6 = (const struct GNUNET_TUN_IPv6Header *) &tun[1];
       get_destination_key_from_ip (AF_INET6,
@@ -1557,7 +1557,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
                               &pkt6->destination_address,
                               buf,
                               sizeof (buf)));
-       return;
+       return GNUNET_OK;
       }
       route_packet (de,
                    AF_INET6,
@@ -1576,7 +1576,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
       {
        /* blame kernel */
        GNUNET_break (0);
-       return;
+       return GNUNET_OK;
       }
       pkt4 = (struct GNUNET_TUN_IPv4Header *) &tun[1];
       get_destination_key_from_ip (AF_INET,
@@ -1598,13 +1598,13 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
                               &pkt4->destination_address,
                               buf,
                               sizeof (buf)));
-       return;
+        return GNUNET_OK;
       }
       if (pkt4->header_length * 4 != sizeof (struct GNUNET_TUN_IPv4Header))
       {
        GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                    _("Received IPv4 packet with options (dropping it)\n"));                
-       return;
+        return GNUNET_OK;
       }
       route_packet (de,
                    AF_INET,
@@ -1621,6 +1621,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
                (unsigned int) ntohs (tun->proto));
     break;
   }
+  return GNUNET_OK;
 }