aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dns/dnsparser.h10
-rw-r--r--src/gns/gns.conf.in32
-rw-r--r--src/gns/gnunet-service-gns.c11
3 files changed, 44 insertions, 9 deletions
diff --git a/src/dns/dnsparser.h b/src/dns/dnsparser.h
index 9d2880a696..d312f8931c 100644
--- a/src/dns/dnsparser.h
+++ b/src/dns/dnsparser.h
@@ -172,20 +172,22 @@ struct srv_data
/* followed by 'target' name */
};
+
/**
* Payload of GNS VPN record
*/
struct vpn_data
{
/**
- * The protocol to use
+ * The peer to contact
*/
- uint16_t proto;
+ struct GNUNET_HashCode peer;
/**
- * The peer to contact
+ * The protocol to use
*/
- struct GNUNET_HashCode peer;
+ uint16_t proto GNUNET_PACKED;
+
/* followed by the servicename / identifier / password (0-terminated) */
};
diff --git a/src/gns/gns.conf.in b/src/gns/gns.conf.in
index 9746c07af0..e865efd21f 100644
--- a/src/gns/gns.conf.in
+++ b/src/gns/gns.conf.in
@@ -5,25 +5,57 @@ HOME = $SERVICEHOME
BINARY = gnunet-service-gns
UNIXPATH = /tmp/gnunet-service-gns.sock
@UNIXONLY@PORT = 2102
+
+# Where to store the key for the Master zone
ZONEKEY = $SERVICEHOME/gns/zonekey.zkey
+
+# Where to store the key for the Private zone
PRIVATE_ZONEKEY = $SERVICEHOME/gns/zonekey_priv.zkey
+
+# Where to store the key for the Shorten zone
SHORTEN_ZONEKEY = $SERVICEHOME/gns/zonekey_short.zkey
+
+# Should we hijack DNS queries using the Linux firewall?
+# (this only works on GNU/Linux systems)
HIJACK_DNS = NO
+
+# Automatically import PKEYs we learn into the shorten zone?
AUTO_IMPORT_PKEY = YES
+
+# When we automatically import PKEYs into shorten zone, require confirmation
+# before they become active? (Not useful right now as the GUI to confirm
+# doesn't exist)
AUTO_IMPORT_CONFIRMATION_REQ = NO
+
+# How many queries is GADS allowed to perform in the background at the same time?
MAX_PARALLEL_BACKGROUND_QUERIES = 25
+
+# When do queries fail with timeout?
DEFAULT_LOOKUP_TIMEOUT = 10 s
+
+# How frequently do we try to publish our full zone?
ZONE_PUBLISH_TIME_WINDOW = 4 h
+
# PREFIX = valgrind --leak-check=full --track-origins=yes
[gns-proxy]
+# Where is the certificate for the GNS proxy stored?
PROXY_CACERT = $SERVICEHOME/gns/gnsCAcert.pem
PROXY_UNIXPATH = /tmp/gnunet-gns-proxy.sock
[fcfsd]
+# On what port does the FCFS daemon listen for HTTP clients?
HTTPPORT = 18080
+
+# Where is the zone key for the FCFS zone stored?
ZONEKEY = $SERVICEHOME/fcfsd/zonekey.zkey
+
+# For ARM, not very useful. FIXME: Dead option?
HOSTNAME = localhost
+
+# FIXME: Dead option?
HOME = $SERVICEHOME
+
+# Name of the fcfs binary (for ARM)
BINARY = gnunet-gns-fcfsd
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c
index ccb1b8e3d0..5ce0890803 100644
--- a/src/gns/gnunet-service-gns.c
+++ b/src/gns/gnunet-service-gns.c
@@ -1142,7 +1142,7 @@ handle_lookup (void *cls,
}
if (1 == ntohl (sh_msg->use_default_zone))
- clh->zone = zone_hash; //Default zone
+ clh->zone = zone_hash; /* Default zone */
else
clh->zone = sh_msg->zone;
@@ -1293,13 +1293,14 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
if (GNUNET_YES ==
GNUNET_CONFIGURATION_get_value_yesno (c, "gns", "HIJACK_DNS"))
{
- GNUNET_log(GNUNET_ERROR_TYPE_INFO,
- "DNS hijacking enabled... connecting to service.\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "DNS hijacking enabled. Connecting to DNS service.\n");
- if (gns_interceptor_init(zone_hash, zone_key, c) == GNUNET_SYSERR)
+ if (GNUNET_SYSERR ==
+ gns_interceptor_init (zone_hash, zone_key, c))
{
GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
- "Failed to enable the dns interceptor!\n");
+ "Failed to enable the DNS interceptor!\n");
}
}