aboutsummaryrefslogtreecommitdiff
path: root/src/dht
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht')
-rw-r--r--src/dht/dht_api.c14
-rw-r--r--src/dht/gnunet-service-dht_clients.c2
-rw-r--r--src/dht/gnunet-service-dht_datacache.c2
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c16
4 files changed, 17 insertions, 17 deletions
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c
index ee208b50e..42ddc7b60 100644
--- a/src/dht/dht_api.c
+++ b/src/dht/dht_api.c
@@ -319,7 +319,7 @@ send_get_known_results (struct GNUNET_DHT_GetHandle *gh,
319 unsigned int max; 319 unsigned int max;
320 unsigned int transmission_offset; 320 unsigned int transmission_offset;
321 321
322 max = (GNUNET_SERVER_MAX_MESSAGE_SIZE - sizeof (*msg)) 322 max = (GNUNET_MAX_MESSAGE_SIZE - sizeof (*msg))
323 / sizeof (struct GNUNET_HashCode); 323 / sizeof (struct GNUNET_HashCode);
324 transmission_offset = transmission_offset_start; 324 transmission_offset = transmission_offset_start;
325 while (transmission_offset < gh->seen_results_end) 325 while (transmission_offset < gh->seen_results_end)
@@ -704,9 +704,9 @@ check_client_result (void *cls,
704 sizeof (struct GNUNET_PeerIdentity) * (get_path_length + put_path_length); 704 sizeof (struct GNUNET_PeerIdentity) * (get_path_length + put_path_length);
705 if ( (msize < meta_length) || 705 if ( (msize < meta_length) ||
706 (get_path_length > 706 (get_path_length >
707 GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity)) || 707 GNUNET_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity)) ||
708 (put_path_length > 708 (put_path_length >
709 GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity)) ) 709 GNUNET_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity)) )
710 { 710 {
711 GNUNET_break (0); 711 GNUNET_break (0);
712 return GNUNET_SYSERR; 712 return GNUNET_SYSERR;
@@ -998,8 +998,8 @@ GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle,
998 struct GNUNET_DHT_PutHandle *ph; 998 struct GNUNET_DHT_PutHandle *ph;
999 999
1000 msize = sizeof (struct GNUNET_DHT_ClientPutMessage) + size; 1000 msize = sizeof (struct GNUNET_DHT_ClientPutMessage) + size;
1001 if ((msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || 1001 if ((msize >= GNUNET_MAX_MESSAGE_SIZE) ||
1002 (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE)) 1002 (size >= GNUNET_MAX_MESSAGE_SIZE))
1003 { 1003 {
1004 GNUNET_break (0); 1004 GNUNET_break (0);
1005 return NULL; 1005 return NULL;
@@ -1090,8 +1090,8 @@ GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle,
1090 size_t msize; 1090 size_t msize;
1091 1091
1092 msize = sizeof (struct GNUNET_DHT_ClientGetMessage) + xquery_size; 1092 msize = sizeof (struct GNUNET_DHT_ClientGetMessage) + xquery_size;
1093 if ((msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || 1093 if ((msize >= GNUNET_MAX_MESSAGE_SIZE) ||
1094 (xquery_size >= GNUNET_SERVER_MAX_MESSAGE_SIZE)) 1094 (xquery_size >= GNUNET_MAX_MESSAGE_SIZE))
1095 { 1095 {
1096 GNUNET_break (0); 1096 GNUNET_break (0);
1097 return NULL; 1097 return NULL;
diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c
index 0f521a401..cb155c484 100644
--- a/src/dht/gnunet-service-dht_clients.c
+++ b/src/dht/gnunet-service-dht_clients.c
@@ -1166,7 +1166,7 @@ GDS_CLIENTS_handle_reply (struct GNUNET_TIME_Absolute expiration,
1166 1166
1167 msize = sizeof (struct GNUNET_DHT_ClientResultMessage) + data_size + 1167 msize = sizeof (struct GNUNET_DHT_ClientResultMessage) + data_size +
1168 (get_path_length + put_path_length) * sizeof (struct GNUNET_PeerIdentity); 1168 (get_path_length + put_path_length) * sizeof (struct GNUNET_PeerIdentity);
1169 if (msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) 1169 if (msize >= GNUNET_MAX_MESSAGE_SIZE)
1170 { 1170 {
1171 GNUNET_break (0); 1171 GNUNET_break (0);
1172 return; 1172 return;
diff --git a/src/dht/gnunet-service-dht_datacache.c b/src/dht/gnunet-service-dht_datacache.c
index fef637cad..36047d561 100644
--- a/src/dht/gnunet-service-dht_datacache.c
+++ b/src/dht/gnunet-service-dht_datacache.c
@@ -72,7 +72,7 @@ GDS_DATACACHE_handle_put (struct GNUNET_TIME_Absolute expiration,
72 _("%s request received, but have no datacache!\n"), "PUT"); 72 _("%s request received, but have no datacache!\n"), "PUT");
73 return; 73 return;
74 } 74 }
75 if (data_size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) 75 if (data_size >= GNUNET_MAX_MESSAGE_SIZE)
76 { 76 {
77 GNUNET_break (0); 77 GNUNET_break (0);
78 return; 78 return;
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index 15071edca..0309bea88 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -1423,7 +1423,7 @@ GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type,
1423 UINT32_MAX); 1423 UINT32_MAX);
1424 } 1424 }
1425 msize = xquery_size + reply_bf_size; 1425 msize = xquery_size + reply_bf_size;
1426 if (msize + sizeof (struct PeerGetMessage) >= GNUNET_SERVER_MAX_MESSAGE_SIZE) 1426 if (msize + sizeof (struct PeerGetMessage) >= GNUNET_MAX_MESSAGE_SIZE)
1427 { 1427 {
1428 GNUNET_break (0); 1428 GNUNET_break (0);
1429 GNUNET_free_non_null (reply_bf); 1429 GNUNET_free_non_null (reply_bf);
@@ -1522,12 +1522,12 @@ GDS_NEIGHBOURS_handle_reply (const struct GNUNET_PeerIdentity *target,
1522 1522
1523 msize = data_size + (get_path_length + put_path_length) * 1523 msize = data_size + (get_path_length + put_path_length) *
1524 sizeof (struct GNUNET_PeerIdentity); 1524 sizeof (struct GNUNET_PeerIdentity);
1525 if ((msize + sizeof (struct PeerResultMessage) >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || 1525 if ((msize + sizeof (struct PeerResultMessage) >= GNUNET_MAX_MESSAGE_SIZE) ||
1526 (get_path_length > 1526 (get_path_length >
1527 GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity)) || 1527 GNUNET_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity)) ||
1528 (put_path_length > 1528 (put_path_length >
1529 GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity)) || 1529 GNUNET_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity)) ||
1530 (data_size > GNUNET_SERVER_MAX_MESSAGE_SIZE)) 1530 (data_size > GNUNET_MAX_MESSAGE_SIZE))
1531 { 1531 {
1532 GNUNET_break (0); 1532 GNUNET_break (0);
1533 return; 1533 return;
@@ -1627,7 +1627,7 @@ check_dht_p2p_put (void *cls,
1627 sizeof (struct PeerPutMessage) + 1627 sizeof (struct PeerPutMessage) +
1628 putlen * sizeof (struct GNUNET_PeerIdentity)) || 1628 putlen * sizeof (struct GNUNET_PeerIdentity)) ||
1629 (putlen > 1629 (putlen >
1630 GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity))) 1630 GNUNET_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity)))
1631 { 1631 {
1632 GNUNET_break_op (0); 1632 GNUNET_break_op (0);
1633 return GNUNET_SYSERR; 1633 return GNUNET_SYSERR;
@@ -2213,9 +2213,9 @@ check_dht_p2p_result (void *cls,
2213 put_path_length) * 2213 put_path_length) *
2214 sizeof (struct GNUNET_PeerIdentity)) || 2214 sizeof (struct GNUNET_PeerIdentity)) ||
2215 (get_path_length > 2215 (get_path_length >
2216 GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity)) || 2216 GNUNET_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity)) ||
2217 (put_path_length > 2217 (put_path_length >
2218 GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity))) 2218 GNUNET_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_PeerIdentity)))
2219 { 2219 {
2220 GNUNET_break_op (0); 2220 GNUNET_break_op (0);
2221 return GNUNET_SYSERR; 2221 return GNUNET_SYSERR;