aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index 9d1dff8a6..61d0398ff 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -111,7 +111,7 @@ struct PeerPutMessage
111 struct GNUNET_MessageHeader header; 111 struct GNUNET_MessageHeader header;
112 112
113 /** 113 /**
114 * Content type. 114 * Content type, must not be zero.
115 */ 115 */
116 uint32_t type GNUNET_PACKED; 116 uint32_t type GNUNET_PACKED;
117 117
@@ -1924,6 +1924,11 @@ check_dht_p2p_put (void *cls,
1924 GNUNET_break_op (0); 1924 GNUNET_break_op (0);
1925 return GNUNET_SYSERR; 1925 return GNUNET_SYSERR;
1926 } 1926 }
1927 if (GNUNET_BLOCK_TYPE_ANY == htonl (put->type))
1928 {
1929 GNUNET_break_op (0);
1930 return GNUNET_SYSERR;
1931 }
1927 return GNUNET_OK; 1932 return GNUNET_OK;
1928} 1933}
1929 1934
@@ -2357,7 +2362,8 @@ handle_dht_p2p_get (void *cls,
2357 (GDS_am_closest_peer (&get->key, 2362 (GDS_am_closest_peer (&get->key,
2358 peer_bf)) ) 2363 peer_bf)) )
2359 { 2364 {
2360 if (GNUNET_BLOCK_TYPE_DHT_URL_HELLO == type) 2365 if ( (GNUNET_BLOCK_TYPE_DHT_URL_HELLO == type) ||
2366 (GNUNET_BLOCK_TYPE_ANY == type) )
2361 { 2367 {
2362 GNUNET_STATISTICS_update (GDS_stats, 2368 GNUNET_STATISTICS_update (GDS_stats,
2363 "# P2P HELLO lookup requests processed", 2369 "# P2P HELLO lookup requests processed",
@@ -2481,7 +2487,8 @@ process_reply_with_path (const struct GNUNET_DATACACHE_Block *bd,
2481 if (NULL != bd->put_path) 2487 if (NULL != bd->put_path)
2482 GNUNET_memcpy (xput_path, 2488 GNUNET_memcpy (xput_path,
2483 bd->put_path, 2489 bd->put_path,
2484 bd->put_path_length * sizeof(struct GNUNET_DHT_PathElement)); 2490 bd->put_path_length * sizeof(struct
2491 GNUNET_DHT_PathElement));
2485 GNUNET_memcpy (&xput_path[bd->put_path_length], 2492 GNUNET_memcpy (&xput_path[bd->put_path_length],
2486 get_path, 2493 get_path,
2487 get_path_length * sizeof(struct GNUNET_DHT_PathElement)); 2494 get_path_length * sizeof(struct GNUNET_DHT_PathElement));