[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: NAMESTORE: Warn use of low relative expi
From: |
gnunet |
Subject: |
[gnunet] branch master updated: NAMESTORE: Warn use of low relative expiration times |
Date: |
Fri, 04 Mar 2022 14:17:56 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 0e6b1f4a2 NAMESTORE: Warn use of low relative expiration times
0e6b1f4a2 is described below
commit 0e6b1f4a2d6cdbc175c31043e99897247331f27c
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Fri Mar 4 14:17:37 2022 +0100
NAMESTORE: Warn use of low relative expiration times
---
src/namestore/gnunet-namestore.c | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index 40872ca8e..3e19eba4b 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -33,6 +33,12 @@
#include <gnunet_gns_service.h>
#include <gnunet_namestore_service.h>
+/**
+ * The upper bound for the zone iteration interval
+ * (per record).
+ */
+#define WARN_RELATIVE_EXPIRATION_LIMIT GNUNET_TIME_relative_multiply ( \
+ GNUNET_TIME_UNIT_MINUTES, 15)
/**
* Entry in record set for bulk processing.
@@ -866,6 +872,13 @@ parse_expiration (const char *expirationstring,
{
*etime_is_rel = GNUNET_YES;
*etime = etime_rel.rel_value_us;
+ if (GNUNET_TIME_relative_cmp (etime_rel, <,
WARN_RELATIVE_EXPIRATION_LIMIT))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Relative expiration times of less than %s are not
recommended\n",
+ GNUNET_STRINGS_relative_time_to_string (
+ WARN_RELATIVE_EXPIRATION_LIMIT, GNUNET_NO));
+ }
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Storing record with relative expiration time of %s\n",
GNUNET_STRINGS_relative_time_to_string (etime_rel, GNUNET_NO));
@@ -1149,8 +1162,8 @@ run_with_zone_pkey (const struct
GNUNET_CONFIGURATION_Handle *cfg)
char sname[64];
struct GNUNET_IDENTITY_PublicKey pkey;
- memset(sh, 0, 105);
- memset(sname, 0, 64);
+ memset (sh, 0, 105);
+ memset (sname, 0, 64);
if ((2 != (sscanf (uri, "gnunet://gns/%58s/%63s", sh, sname))) ||
(GNUNET_OK !=
@@ -1642,13 +1655,13 @@ main (int argc, char *const *argv)
NULL)))
{
GNUNET_free_nz ((void *) argv);
- //FIXME
- //GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey);
+ // FIXME
+ // GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey);
return lret;
}
GNUNET_free_nz ((void *) argv);
- //FIXME
- //GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey);
+ // FIXME
+ // GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey);
return ret;
}
--
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: NAMESTORE: Warn use of low relative expiration times,
gnunet <=