[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: disallow ANY for block type in PUTs; do
From: |
gnunet |
Subject: |
[gnunet] branch master updated: disallow ANY for block type in PUTs; do return HELLOs for ANY in GET requests (see recent clarifications to R5N specification) |
Date: |
Thu, 27 Oct 2022 11:34:44 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 2b86b51b1 disallow ANY for block type in PUTs; do return HELLOs for
ANY in GET requests (see recent clarifications to R5N specification)
2b86b51b1 is described below
commit 2b86b51b1cb535f75882ca70ee884adca8e6949c
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Oct 27 11:33:59 2022 +0200
disallow ANY for block type in PUTs; do return HELLOs for ANY in GET
requests (see recent clarifications to R5N specification)
---
src/dht/gnunet-service-dht_neighbours.c | 13 ++++++++++---
1 file 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
struct GNUNET_MessageHeader header;
/**
- * Content type.
+ * Content type, must not be zero.
*/
uint32_t type GNUNET_PACKED;
@@ -1924,6 +1924,11 @@ check_dht_p2p_put (void *cls,
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
+ if (GNUNET_BLOCK_TYPE_ANY == htonl (put->type))
+ {
+ GNUNET_break_op (0);
+ return GNUNET_SYSERR;
+ }
return GNUNET_OK;
}
@@ -2357,7 +2362,8 @@ handle_dht_p2p_get (void *cls,
(GDS_am_closest_peer (&get->key,
peer_bf)) )
{
- if (GNUNET_BLOCK_TYPE_DHT_URL_HELLO == type)
+ if ( (GNUNET_BLOCK_TYPE_DHT_URL_HELLO == type) ||
+ (GNUNET_BLOCK_TYPE_ANY == type) )
{
GNUNET_STATISTICS_update (GDS_stats,
"# P2P HELLO lookup requests processed",
@@ -2481,7 +2487,8 @@ process_reply_with_path (const struct
GNUNET_DATACACHE_Block *bd,
if (NULL != bd->put_path)
GNUNET_memcpy (xput_path,
bd->put_path,
- bd->put_path_length * sizeof(struct
GNUNET_DHT_PathElement));
+ bd->put_path_length * sizeof(struct
+ GNUNET_DHT_PathElement));
GNUNET_memcpy (&xput_path[bd->put_path_length],
get_path,
get_path_length * sizeof(struct GNUNET_DHT_PathElement));
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: disallow ANY for block type in PUTs; do return HELLOs for ANY in GET requests (see recent clarifications to R5N specification),
gnunet <=