aboutsummaryrefslogtreecommitdiff
path: root/src/dns
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-05-24 09:35:37 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-05-24 09:35:37 +0000
commit101f5787ac60dafa175950fb714c6d4cc4906478 (patch)
tree711c8042c8b22856b0946d0c819a3520498ac274 /src/dns
parent6743123dcc6b37dabf2759f384a7f6ad08a08bec (diff)
downloadgnunet-101f5787ac60dafa175950fb714c6d4cc4906478.tar.gz
gnunet-101f5787ac60dafa175950fb714c6d4cc4906478.zip
- adding return value to mst callback
Diffstat (limited to 'src/dns')
-rw-r--r--src/dns/gnunet-service-dns.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/dns/gnunet-service-dns.c b/src/dns/gnunet-service-dns.c
index 173fd24e8..6337538d1 100644
--- a/src/dns/gnunet-service-dns.c
+++ b/src/dns/gnunet-service-dns.c
@@ -1239,7 +1239,7 @@ handle_client_response (void *cls GNUNET_UNUSED,
1239 * @param client identification of the client 1239 * @param client identification of the client
1240 * @param message the actual message, a DNS request we should handle 1240 * @param message the actual message, a DNS request we should handle
1241 */ 1241 */
1242static void 1242static int
1243process_helper_messages (void *cls GNUNET_UNUSED, void *client, 1243process_helper_messages (void *cls GNUNET_UNUSED, void *client,
1244 const struct GNUNET_MessageHeader *message) 1244 const struct GNUNET_MessageHeader *message)
1245{ 1245{
@@ -1260,7 +1260,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
1260 { 1260 {
1261 /* non-IP packet received on TUN!? */ 1261 /* non-IP packet received on TUN!? */
1262 GNUNET_break (0); 1262 GNUNET_break (0);
1263 return; 1263 return GNUNET_OK;
1264 } 1264 }
1265 msize -= sizeof (struct GNUNET_MessageHeader); 1265 msize -= sizeof (struct GNUNET_MessageHeader);
1266 tun = (const struct GNUNET_TUN_Layer2PacketHeader *) &message[1]; 1266 tun = (const struct GNUNET_TUN_Layer2PacketHeader *) &message[1];
@@ -1279,7 +1279,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
1279 /* non-IP/UDP packet received on TUN (or with options) */ 1279 /* non-IP/UDP packet received on TUN (or with options) */
1280 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1280 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1281 _("Received malformed IPv4-UDP packet on TUN interface.\n")); 1281 _("Received malformed IPv4-UDP packet on TUN interface.\n"));
1282 return; 1282 return GNUNET_OK;
1283 } 1283 }
1284 udp = (const struct GNUNET_TUN_UdpHeader*) &ip4[1]; 1284 udp = (const struct GNUNET_TUN_UdpHeader*) &ip4[1];
1285 msize -= sizeof (struct GNUNET_TUN_IPv4Header); 1285 msize -= sizeof (struct GNUNET_TUN_IPv4Header);
@@ -1295,7 +1295,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
1295 /* non-IP/UDP packet received on TUN (or with extensions) */ 1295 /* non-IP/UDP packet received on TUN (or with extensions) */
1296 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1296 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1297 _("Received malformed IPv6-UDP packet on TUN interface.\n")); 1297 _("Received malformed IPv6-UDP packet on TUN interface.\n"));
1298 return; 1298 return GNUNET_OK;
1299 } 1299 }
1300 udp = (const struct GNUNET_TUN_UdpHeader*) &ip6[1]; 1300 udp = (const struct GNUNET_TUN_UdpHeader*) &ip6[1];
1301 msize -= sizeof (struct GNUNET_TUN_IPv6Header); 1301 msize -= sizeof (struct GNUNET_TUN_IPv6Header);
@@ -1306,7 +1306,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
1306 _("Got non-IP packet with %u bytes and protocol %u from TUN\n"), 1306 _("Got non-IP packet with %u bytes and protocol %u from TUN\n"),
1307 (unsigned int) msize, 1307 (unsigned int) msize,
1308 ntohs (tun->proto)); 1308 ntohs (tun->proto));
1309 return; 1309 return GNUNET_OK;
1310 } 1310 }
1311 if (msize <= sizeof (struct GNUNET_TUN_UdpHeader) + sizeof (struct GNUNET_TUN_DnsHeader)) 1311 if (msize <= sizeof (struct GNUNET_TUN_UdpHeader) + sizeof (struct GNUNET_TUN_DnsHeader))
1312 { 1312 {
@@ -1314,7 +1314,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
1314 GNUNET_STATISTICS_update (stats, 1314 GNUNET_STATISTICS_update (stats,
1315 gettext_noop ("# Non-DNS UDP packet received via TUN interface"), 1315 gettext_noop ("# Non-DNS UDP packet received via TUN interface"),
1316 1, GNUNET_NO); 1316 1, GNUNET_NO);
1317 return; 1317 return GNUNET_OK;
1318 } 1318 }
1319 msize -= sizeof (struct GNUNET_TUN_UdpHeader); 1319 msize -= sizeof (struct GNUNET_TUN_UdpHeader);
1320 dns = (const struct GNUNET_TUN_DnsHeader*) &udp[1]; 1320 dns = (const struct GNUNET_TUN_DnsHeader*) &udp[1];
@@ -1381,6 +1381,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
1381 1, GNUNET_NO); 1381 1, GNUNET_NO);
1382 /* start request processing state machine */ 1382 /* start request processing state machine */
1383 next_phase (rr); 1383 next_phase (rr);
1384 return GNUNET_OK;
1384} 1385}
1385 1386
1386 1387