diff options
author | lurchi <lurchi@strangeplace.net> | 2018-01-07 00:59:50 +0100 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2018-01-07 01:00:16 +0100 |
commit | ea351cef94af33ccf28c66434c28aefc100ad6e0 (patch) | |
tree | 353402ffae266e4c31cc1462710dab0c56b24e92 | |
parent | 1522c35f31166008edec5a3ac341d80626792e42 (diff) | |
parent | 9a558c93bd51152121c4c15dad0a5a66e8e87c96 (diff) | |
download | gnunet-ea351cef94af33ccf28c66434c28aefc100ad6e0.tar.gz gnunet-ea351cef94af33ccf28c66434c28aefc100ad6e0.zip |
Merge branch 'master' of https://gnunet.org/git/gnunet
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | doc/documentation/chapters/developer.texi | 12 | ||||
-rw-r--r-- | doc/documentation/chapters/philosophy.texi | 11 | ||||
-rw-r--r-- | doc/documentation/chapters/user.texi | 6 | ||||
-rw-r--r-- | src/fs/fs_search.c | 19 | ||||
-rw-r--r-- | src/fs/fs_uri.c | 25 | ||||
-rw-r--r-- | src/gns/gnunet-dns2gns.c | 45 | ||||
-rw-r--r-- | src/include/gnunet_fs_service.h | 3 | ||||
-rw-r--r-- | src/peerinfo/gnunet-service-peerinfo.c | 6 | ||||
-rw-r--r-- | src/set/gnunet-service-set_union.c | 9 | ||||
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 7 | ||||
-rw-r--r-- | src/util/common_allocation.c | 1 | ||||
-rw-r--r-- | src/util/configuration.c | 1 |
13 files changed, 99 insertions, 47 deletions
@@ -33,6 +33,7 @@ Contributions also came from: | |||
33 | Adam Warrington [ UPnP ] | 33 | Adam Warrington [ UPnP ] |
34 | Adriano Peluso [ Documentation export to Texinfo ] | 34 | Adriano Peluso [ Documentation export to Texinfo ] |
35 | Alex Harper [ OS X CPU load ] | 35 | Alex Harper [ OS X CPU load ] |
36 | Amirouche Boubekki <amirouche@hypermove.net> | ||
36 | Andrew McDonald <andrew@mcdonald.org.uk> [ SHA-512] | 37 | Andrew McDonald <andrew@mcdonald.org.uk> [ SHA-512] |
37 | Andy Green <andy@warmcat.com> | 38 | Andy Green <andy@warmcat.com> |
38 | Antti Salonen | 39 | Antti Salonen |
diff --git a/doc/documentation/chapters/developer.texi b/doc/documentation/chapters/developer.texi index ada6d37a0..a99f6a481 100644 --- a/doc/documentation/chapters/developer.texi +++ b/doc/documentation/chapters/developer.texi | |||
@@ -94,6 +94,7 @@ following links: | |||
94 | @c ** FIXME: Link to files in source, not online. | 94 | @c ** FIXME: Link to files in source, not online. |
95 | @c ** FIXME: Where is the Java tutorial? | 95 | @c ** FIXME: Where is the Java tutorial? |
96 | @itemize @bullet | 96 | @itemize @bullet |
97 | @c broken link | ||
97 | @item @uref{https://gnunet.org/git/gnunet.git/plain/doc/gnunet-c-tutorial.pdf, GNUnet C tutorial} | 98 | @item @uref{https://gnunet.org/git/gnunet.git/plain/doc/gnunet-c-tutorial.pdf, GNUnet C tutorial} |
98 | @item GNUnet Java tutorial | 99 | @item GNUnet Java tutorial |
99 | @end itemize | 100 | @end itemize |
@@ -273,7 +274,7 @@ library is a wapper around block plugins which provide the necessary | |||
273 | functions for each block type. | 274 | functions for each block type. |
274 | @item @file{statistics/} --- statistics service | 275 | @item @file{statistics/} --- statistics service |
275 | The statistics service enables associating | 276 | The statistics service enables associating |
276 | values (of type uint64_t) with a componenet name and a string. The main | 277 | values (of type uint64_t) with a component name and a string. The main |
277 | uses is debugging (counting events), performance tracking and user | 278 | uses is debugging (counting events), performance tracking and user |
278 | entertainment (what did my peer do today?). | 279 | entertainment (what did my peer do today?). |
279 | @item @file{arm/} --- Automatic Restart Manager (ARM) | 280 | @item @file{arm/} --- Automatic Restart Manager (ARM) |
@@ -2450,7 +2451,7 @@ memcpy (tbuf, nameTrans, strlen (nameTrans) + 1); | |||
2450 | 2451 | ||
2451 | Note that, here the functions @code{htonl}, @code{htons} and | 2452 | Note that, here the functions @code{htonl}, @code{htons} and |
2452 | @code{GNUNET_TIME_absolute_hton} are applied to convert little endian | 2453 | @code{GNUNET_TIME_absolute_hton} are applied to convert little endian |
2453 | into big endian, about the usage of the big/small edian order and the | 2454 | into big endian, about the usage of the big/small endian order and the |
2454 | corresponding conversion function please refer to Introduction of | 2455 | corresponding conversion function please refer to Introduction of |
2455 | Big Endian and Little Endian. | 2456 | Big Endian and Little Endian. |
2456 | 2457 | ||
@@ -7027,6 +7028,7 @@ bandwidth consumption. | |||
7027 | 7028 | ||
7028 | @c %**end of header | 7029 | @c %**end of header |
7029 | 7030 | ||
7031 | @c inconsistent use of ``must'' above it's written ``MUST'' | ||
7030 | In contrast to GET operations, developers @strong{must} manually re-run | 7032 | In contrast to GET operations, developers @strong{must} manually re-run |
7031 | PUT operations periodically (if they intend the content to continue to be | 7033 | PUT operations periodically (if they intend the content to continue to be |
7032 | available). Content stored in the DHT expires or might be lost due to | 7034 | available). Content stored in the DHT expires or might be lost due to |
@@ -7055,7 +7057,7 @@ Using the monitoring API, applications can choose to monitor these | |||
7055 | requests, possibly limiting themselves to requests for a particular block | 7057 | requests, possibly limiting themselves to requests for a particular block |
7056 | type. | 7058 | type. |
7057 | 7059 | ||
7058 | The monitoring API is not only usefu only for diagnostics, it can also be | 7060 | The monitoring API is not only useful for diagnostics, it can also be |
7059 | used to trigger application operations based on PUT operations. | 7061 | used to trigger application operations based on PUT operations. |
7060 | For example, an application may use PUTs to distribute work requests to | 7062 | For example, an application may use PUTs to distribute work requests to |
7061 | other peers. | 7063 | other peers. |
@@ -7149,7 +7151,7 @@ already knows more than about a thousand blocks may need to send | |||
7149 | several of these messages. Naturally, the client should transmit these | 7151 | several of these messages. Naturally, the client should transmit these |
7150 | messages as quickly as possible after the original GET request such that | 7152 | messages as quickly as possible after the original GET request such that |
7151 | the DHT can filter those results in the network early on. Naturally, as | 7153 | the DHT can filter those results in the network early on. Naturally, as |
7152 | these messages are send after the original request, it is conceivalbe | 7154 | these messages are sent after the original request, it is conceivalbe |
7153 | that the DHT service may return blocks that match those already known | 7155 | that the DHT service may return blocks that match those already known |
7154 | to the client anyway. | 7156 | to the client anyway. |
7155 | 7157 | ||
@@ -7240,7 +7242,7 @@ A peer can search the DHT by sending @code{struct PeerGetMessage}s of type | |||
7240 | @code{GNUNET_MESSAGE_TYPE_DHT_P2P_GET} to other peers. In addition to the | 7242 | @code{GNUNET_MESSAGE_TYPE_DHT_P2P_GET} to other peers. In addition to the |
7241 | usual information about the request (type, routing options, desired | 7243 | usual information about the request (type, routing options, desired |
7242 | replication level for the request, the key and the extended query), a GET | 7244 | replication level for the request, the key and the extended query), a GET |
7243 | request also again contains a hop counter, a Bloom filter over the peers | 7245 | request also contains a hop counter, a Bloom filter over the peers |
7244 | that have processed the request already and depending on the routing | 7246 | that have processed the request already and depending on the routing |
7245 | options the full path traversed by the GET. | 7247 | options the full path traversed by the GET. |
7246 | Finally, a GET request includes a variable-size second Bloom filter and a | 7248 | Finally, a GET request includes a variable-size second Bloom filter and a |
diff --git a/doc/documentation/chapters/philosophy.texi b/doc/documentation/chapters/philosophy.texi index c8e2651c3..681d5acc3 100644 --- a/doc/documentation/chapters/philosophy.texi +++ b/doc/documentation/chapters/philosophy.texi | |||
@@ -47,7 +47,9 @@ Refer to @uref{https://www.gnu.org/philosophy/free-sw.html, https://www.gnu.org/ | |||
47 | @item GNUnet must only disclose the minimal amount of information | 47 | @item GNUnet must only disclose the minimal amount of information |
48 | necessary. | 48 | necessary. |
49 | @c TODO: Explain 'fully' in the terminology section. | 49 | @c TODO: Explain 'fully' in the terminology section. |
50 | @item GNUnet must be fully distributed and survive Byzantine failures | 50 | @item GNUnet must be fully distributed and survive |
51 | @uref{https://en.wikipedia.org/wiki/Byzantine_fault_tolerance, Byzantine failures} | ||
52 | @footnote{@uref{https://en.wikipedia.org/wiki/Byzantine_fault_tolerance, https://en.wikipedia.org/wiki/Byzantine_fault_tolerance}} | ||
51 | at any position in the network. | 53 | at any position in the network. |
52 | @item GNUnet must make it explicit to the user which entities are | 54 | @item GNUnet must make it explicit to the user which entities are |
53 | considered to be trustworthy when establishing secured communications. | 55 | considered to be trustworthy when establishing secured communications. |
@@ -163,7 +165,7 @@ DH (Diffie---Hellman) key exchange using ephemeral eliptic curve | |||
163 | cryptography. The ephemeral ECC (Eliptic Curve Cryptography) keys are | 165 | cryptography. The ephemeral ECC (Eliptic Curve Cryptography) keys are |
164 | signed using ECDSA (@uref{http://en.wikipedia.org/wiki/ECDSA, ECDSA}). | 166 | signed using ECDSA (@uref{http://en.wikipedia.org/wiki/ECDSA, ECDSA}). |
165 | The shared secret from ECDHE is used to create a pair of session keys | 167 | The shared secret from ECDHE is used to create a pair of session keys |
166 | @c FIXME: LOng word for HKDF | 168 | @c FIXME: LOng word for HKDF. More FIXMEs: Explain MITM etc. |
167 | (using HKDF) which are then used to encrypt the communication between the | 169 | (using HKDF) which are then used to encrypt the communication between the |
168 | two peers using both 256-bit AES (Advanced Encryption Standard) | 170 | two peers using both 256-bit AES (Advanced Encryption Standard) |
169 | and 256-bit Twofish (with independently derived secret keys). | 171 | and 256-bit Twofish (with independently derived secret keys). |
@@ -173,8 +175,6 @@ without requiring signatures each time. GNUnet uses SHA-512 | |||
173 | (Secure Hash Algorithm) hash codes to verify the integrity of messages. | 175 | (Secure Hash Algorithm) hash codes to verify the integrity of messages. |
174 | 176 | ||
175 | In GNUnet, the identity of a host is its public key. For that reason, | 177 | In GNUnet, the identity of a host is its public key. For that reason, |
176 | @c FIXME: is it clear to the average reader what a man-in-the-middle | ||
177 | @c attack is? | ||
178 | man-in-the-middle attacks will not break the authentication or accounting | 178 | man-in-the-middle attacks will not break the authentication or accounting |
179 | goals. Essentially, for GNUnet, the IP of the host has nothing to do with | 179 | goals. Essentially, for GNUnet, the IP of the host has nothing to do with |
180 | the identity of the host. As the public key is the only thing that truly | 180 | the identity of the host. As the public key is the only thing that truly |
@@ -420,8 +420,9 @@ public key first. | |||
420 | @node Egos | 420 | @node Egos |
421 | @subsection Egos | 421 | @subsection Egos |
422 | 422 | ||
423 | @c what is the difference between peer identity and egos? It seems | ||
424 | @c like both are linked to public-private key pair. | ||
423 | Egos are your "identities" in GNUnet. Any user can assume multiple | 425 | Egos are your "identities" in GNUnet. Any user can assume multiple |
424 | identities, for example to separate their activities online. Egos can | 426 | identities, for example to separate their activities online. Egos can |
425 | correspond to pseudonyms or real-world identities. Technically, an | 427 | correspond to pseudonyms or real-world identities. Technically, an |
426 | ego is first of all a public-private key pair. | 428 | ego is first of all a public-private key pair. |
427 | |||
diff --git a/doc/documentation/chapters/user.texi b/doc/documentation/chapters/user.texi index 4159a6b32..1a30a7336 100644 --- a/doc/documentation/chapters/user.texi +++ b/doc/documentation/chapters/user.texi | |||
@@ -1183,6 +1183,8 @@ shared under the keyword "Das Kapital". | |||
1183 | 1183 | ||
1184 | Search results are printed by gnunet-search like this: | 1184 | Search results are printed by gnunet-search like this: |
1185 | 1185 | ||
1186 | @c it will be better the avoid the ellipsis altogether because I don't | ||
1187 | @c understand the explanation below that | ||
1186 | @example | 1188 | @example |
1187 | $ gnunet-download -o "COPYING" --- gnunet://fs/chk/N8...C92.17992 | 1189 | $ gnunet-download -o "COPYING" --- gnunet://fs/chk/N8...C92.17992 |
1188 | => The GNU Public License <= (mimetype: text/plain) | 1190 | => The GNU Public License <= (mimetype: text/plain) |
@@ -1192,6 +1194,7 @@ $ gnunet-download -o "COPYING" --- gnunet://fs/chk/N8...C92.17992 | |||
1192 | The first line is the command you would have to enter to download | 1194 | The first line is the command you would have to enter to download |
1193 | the file. The argument passed to @code{-o} is the suggested | 1195 | the file. The argument passed to @code{-o} is the suggested |
1194 | filename (you may change it to whatever you like). | 1196 | filename (you may change it to whatever you like). |
1197 | @c except it's triple dash in the above example --- | ||
1195 | The @code{--} is followed by key for decrypting the file, | 1198 | The @code{--} is followed by key for decrypting the file, |
1196 | the query for searching the file, a checksum (in hexadecimal) | 1199 | the query for searching the file, a checksum (in hexadecimal) |
1197 | finally the size of the file in bytes. | 1200 | finally the size of the file in bytes. |
@@ -1235,6 +1238,7 @@ GNUnet's file-encoding mechanism will ensure file integrity, even if the | |||
1235 | existing file was not downloaded from GNUnet in the first place. | 1238 | existing file was not downloaded from GNUnet in the first place. |
1236 | 1239 | ||
1237 | You may want to use the @command{-V} switch (must be added before | 1240 | You may want to use the @command{-V} switch (must be added before |
1241 | @c Same as above it's triple dash | ||
1238 | the @command{--}) to turn on verbose reporting. In this case, | 1242 | the @command{--}) to turn on verbose reporting. In this case, |
1239 | @command{gnunet-download} will print the current number of | 1243 | @command{gnunet-download} will print the current number of |
1240 | bytes downloaded whenever new data was received. | 1244 | bytes downloaded whenever new data was received. |
@@ -1301,7 +1305,7 @@ unavailable. | |||
1301 | @c %**end of header | 1305 | @c %**end of header |
1302 | 1306 | ||
1303 | Each namespace is associated with meta-data that describes | 1307 | Each namespace is associated with meta-data that describes |
1304 | the namespace. This meta data is provided by the user at | 1308 | the namespace. This meta-data is provided by the user at |
1305 | the time that the namespace is advertised. Advertisements | 1309 | the time that the namespace is advertised. Advertisements |
1306 | are published under keywords so that they can be found using | 1310 | are published under keywords so that they can be found using |
1307 | normal keyword-searches. This way, users can learn about new | 1311 | normal keyword-searches. This way, users can learn about new |
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c index 8c6f5edcf..83aae2fc5 100644 --- a/src/fs/fs_search.c +++ b/src/fs/fs_search.c | |||
@@ -568,7 +568,13 @@ process_ksk_result (struct GNUNET_FS_SearchContext *sc, | |||
568 | 568 | ||
569 | /* check if new */ | 569 | /* check if new */ |
570 | GNUNET_assert (NULL != sc); | 570 | GNUNET_assert (NULL != sc); |
571 | GNUNET_FS_uri_to_key (uri, &key); | 571 | if (GNUNET_OK != |
572 | GNUNET_FS_uri_to_key (uri, | ||
573 | &key)) | ||
574 | { | ||
575 | GNUNET_break_op (0); | ||
576 | return; | ||
577 | } | ||
572 | if (GNUNET_SYSERR == | 578 | if (GNUNET_SYSERR == |
573 | GNUNET_CONTAINER_multihashmap_get_multiple (ent->results, | 579 | GNUNET_CONTAINER_multihashmap_get_multiple (ent->results, |
574 | &key, | 580 | &key, |
@@ -680,8 +686,15 @@ process_sks_result (struct GNUNET_FS_SearchContext *sc, | |||
680 | 686 | ||
681 | /* check if new */ | 687 | /* check if new */ |
682 | GNUNET_assert (NULL != sc); | 688 | GNUNET_assert (NULL != sc); |
683 | GNUNET_FS_uri_to_key (uri, &key); | 689 | if (GNUNET_OK != |
684 | GNUNET_CRYPTO_hash_xor (&uri->data.chk.chk.key, &uri->data.chk.chk.query, | 690 | GNUNET_FS_uri_to_key (uri, |
691 | &key)) | ||
692 | { | ||
693 | GNUNET_break (0); | ||
694 | return; | ||
695 | } | ||
696 | GNUNET_CRYPTO_hash_xor (&uri->data.chk.chk.key, | ||
697 | &uri->data.chk.chk.query, | ||
685 | &key); | 698 | &key); |
686 | if (GNUNET_SYSERR == | 699 | if (GNUNET_SYSERR == |
687 | GNUNET_CONTAINER_multihashmap_get_multiple (sc->master_result_map, &key, | 700 | GNUNET_CONTAINER_multihashmap_get_multiple (sc->master_result_map, &key, |
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c index 11968b750..b90c75981 100644 --- a/src/fs/fs_uri.c +++ b/src/fs/fs_uri.c | |||
@@ -96,8 +96,9 @@ | |||
96 | * | 96 | * |
97 | * @param uri uri to convert to a unique key | 97 | * @param uri uri to convert to a unique key |
98 | * @param key where to store the unique key | 98 | * @param key where to store the unique key |
99 | * @return #GNUNET_OK on success | ||
99 | */ | 100 | */ |
100 | void | 101 | int |
101 | GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, | 102 | GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, |
102 | struct GNUNET_HashCode *key) | 103 | struct GNUNET_HashCode *key) |
103 | { | 104 | { |
@@ -105,25 +106,35 @@ GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, | |||
105 | { | 106 | { |
106 | case GNUNET_FS_URI_CHK: | 107 | case GNUNET_FS_URI_CHK: |
107 | *key = uri->data.chk.chk.query; | 108 | *key = uri->data.chk.chk.query; |
108 | return; | 109 | return GNUNET_OK; |
109 | case GNUNET_FS_URI_SKS: | 110 | case GNUNET_FS_URI_SKS: |
110 | GNUNET_CRYPTO_hash (uri->data.sks.identifier, | 111 | GNUNET_CRYPTO_hash (uri->data.sks.identifier, |
111 | strlen (uri->data.sks.identifier), key); | 112 | strlen (uri->data.sks.identifier), |
112 | break; | 113 | key); |
114 | return GNUNET_OK; | ||
113 | case GNUNET_FS_URI_KSK: | 115 | case GNUNET_FS_URI_KSK: |
114 | if (uri->data.ksk.keywordCount > 0) | 116 | if (uri->data.ksk.keywordCount > 0) |
117 | { | ||
115 | GNUNET_CRYPTO_hash (uri->data.ksk.keywords[0], | 118 | GNUNET_CRYPTO_hash (uri->data.ksk.keywords[0], |
116 | strlen (uri->data.ksk.keywords[0]), key); | 119 | strlen (uri->data.ksk.keywords[0]), |
120 | key); | ||
121 | return GNUNET_OK; | ||
122 | } | ||
123 | else | ||
124 | { | ||
125 | memset (key, 0, sizeof (struct GNUNET_HashCode)); | ||
126 | return GNUNET_SYSERR; | ||
127 | } | ||
117 | break; | 128 | break; |
118 | case GNUNET_FS_URI_LOC: | 129 | case GNUNET_FS_URI_LOC: |
119 | GNUNET_CRYPTO_hash (&uri->data.loc.fi, | 130 | GNUNET_CRYPTO_hash (&uri->data.loc.fi, |
120 | sizeof (struct FileIdentifier) + | 131 | sizeof (struct FileIdentifier) + |
121 | sizeof (struct GNUNET_PeerIdentity), | 132 | sizeof (struct GNUNET_PeerIdentity), |
122 | key); | 133 | key); |
123 | break; | 134 | return GNUNET_OK; |
124 | default: | 135 | default: |
125 | memset (key, 0, sizeof (struct GNUNET_HashCode)); | 136 | memset (key, 0, sizeof (struct GNUNET_HashCode)); |
126 | break; | 137 | return GNUNET_SYSERR; |
127 | } | 138 | } |
128 | } | 139 | } |
129 | 140 | ||
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c index 424677d14..2f0de030d 100644 --- a/src/gns/gnunet-dns2gns.c +++ b/src/gns/gnunet-dns2gns.c | |||
@@ -533,14 +533,21 @@ read_dns4 (void *cls) | |||
533 | } | 533 | } |
534 | { | 534 | { |
535 | char buf[size + 1]; | 535 | char buf[size + 1]; |
536 | ssize_t sret; | ||
536 | 537 | ||
537 | addrlen = sizeof (v4); | 538 | addrlen = sizeof (v4); |
538 | GNUNET_break (size == | 539 | sret = GNUNET_NETWORK_socket_recvfrom (listen_socket4, |
539 | GNUNET_NETWORK_socket_recvfrom (listen_socket4, | 540 | buf, |
540 | buf, | 541 | size + 1, |
541 | size + 1, | 542 | (struct sockaddr *) &v4, |
542 | (struct sockaddr *) &v4, | 543 | &addrlen); |
543 | &addrlen)); | 544 | if (0 > sret) |
545 | { | ||
546 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, | ||
547 | "recvfrom"); | ||
548 | return; | ||
549 | } | ||
550 | GNUNET_break (size == (size_t) sret); | ||
544 | handle_request (listen_socket4, | 551 | handle_request (listen_socket4, |
545 | &v4, | 552 | &v4, |
546 | addrlen, | 553 | addrlen, |
@@ -579,16 +586,26 @@ read_dns6 (void *cls) | |||
579 | } | 586 | } |
580 | { | 587 | { |
581 | char buf[size]; | 588 | char buf[size]; |
589 | ssize_t sret; | ||
582 | 590 | ||
583 | addrlen = sizeof (v6); | 591 | addrlen = sizeof (v6); |
584 | GNUNET_break (size == | 592 | sret = GNUNET_NETWORK_socket_recvfrom (listen_socket6, |
585 | GNUNET_NETWORK_socket_recvfrom (listen_socket6, | 593 | buf, |
586 | buf, | 594 | size, |
587 | size, | 595 | (struct sockaddr *) &v6, |
588 | (struct sockaddr *) &v6, | 596 | &addrlen); |
589 | &addrlen)); | 597 | if (0 > sret) |
590 | handle_request (listen_socket6, &v6, addrlen, | 598 | { |
591 | buf, size); | 599 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, |
600 | "recvfrom"); | ||
601 | return; | ||
602 | } | ||
603 | GNUNET_break (size == (size_t) sret); | ||
604 | handle_request (listen_socket6, | ||
605 | &v6, | ||
606 | addrlen, | ||
607 | buf, | ||
608 | size); | ||
592 | } | 609 | } |
593 | } | 610 | } |
594 | 611 | ||
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h index ac418072e..cbad374b5 100644 --- a/src/include/gnunet_fs_service.h +++ b/src/include/gnunet_fs_service.h | |||
@@ -109,8 +109,9 @@ typedef int | |||
109 | * | 109 | * |
110 | * @param uri uri to convert to a unique key | 110 | * @param uri uri to convert to a unique key |
111 | * @param key wherer to store the unique key | 111 | * @param key wherer to store the unique key |
112 | * @return #GNUNET_OK on success | ||
112 | */ | 113 | */ |
113 | void | 114 | int |
114 | GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, | 115 | GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, |
115 | struct GNUNET_HashCode *key); | 116 | struct GNUNET_HashCode *key); |
116 | 117 | ||
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index bdb6e5e0d..6b39149be 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -1146,12 +1146,12 @@ handle_hello (void *cls, | |||
1146 | struct GNUNET_SERVICE_Client *client = cls; | 1146 | struct GNUNET_SERVICE_Client *client = cls; |
1147 | struct GNUNET_PeerIdentity pid; | 1147 | struct GNUNET_PeerIdentity pid; |
1148 | 1148 | ||
1149 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1150 | "HELLO message received for peer `%s'\n", | ||
1151 | GNUNET_i2s (&pid)); | ||
1152 | GNUNET_assert (GNUNET_OK == | 1149 | GNUNET_assert (GNUNET_OK == |
1153 | GNUNET_HELLO_get_id (hello, | 1150 | GNUNET_HELLO_get_id (hello, |
1154 | &pid)); | 1151 | &pid)); |
1152 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1153 | "HELLO message received for peer `%s'\n", | ||
1154 | GNUNET_i2s (&pid)); | ||
1155 | add_host_to_known_hosts (&pid); | 1155 | add_host_to_known_hosts (&pid); |
1156 | update_hello (&pid, | 1156 | update_hello (&pid, |
1157 | hello); | 1157 | hello); |
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c index 9586dcf27..219cc6235 100644 --- a/src/set/gnunet-service-set_union.c +++ b/src/set/gnunet-service-set_union.c | |||
@@ -389,10 +389,11 @@ get_ibf_key (const struct GNUNET_HashCode *src) | |||
389 | struct IBF_Key key; | 389 | struct IBF_Key key; |
390 | uint16_t salt = 0; | 390 | uint16_t salt = 0; |
391 | 391 | ||
392 | GNUNET_CRYPTO_kdf (&key, sizeof (key), | 392 | GNUNET_assert (GNUNET_OK == |
393 | src, sizeof *src, | 393 | GNUNET_CRYPTO_kdf (&key, sizeof (key), |
394 | &salt, sizeof (salt), | 394 | src, sizeof *src, |
395 | NULL, 0); | 395 | &salt, sizeof (salt), |
396 | NULL, 0)); | ||
396 | return key; | 397 | return key; |
397 | } | 398 | } |
398 | 399 | ||
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index c5d6e6d34..8b00543c3 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -3351,9 +3351,10 @@ handle_tcp_data (void *cls, | |||
3351 | void *vaddr = NULL; | 3351 | void *vaddr = NULL; |
3352 | size_t alen; | 3352 | size_t alen; |
3353 | 3353 | ||
3354 | GNUNET_SERVER_client_get_address (client, | 3354 | GNUNET_assert (GNUNET_OK == |
3355 | &vaddr, | 3355 | GNUNET_SERVER_client_get_address (client, |
3356 | &alen); | 3356 | &vaddr, |
3357 | &alen)); | ||
3357 | LOG (GNUNET_ERROR_TYPE_ERROR, | 3358 | LOG (GNUNET_ERROR_TYPE_ERROR, |
3358 | "Received unexpected %u bytes of type %u from `%s'\n", | 3359 | "Received unexpected %u bytes of type %u from `%s'\n", |
3359 | (unsigned int) ntohs (message->size), | 3360 | (unsigned int) ntohs (message->size), |
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c index be2538c3f..80047bb52 100644 --- a/src/util/common_allocation.c +++ b/src/util/common_allocation.c | |||
@@ -484,6 +484,7 @@ GNUNET_asprintf (char **buf, | |||
484 | va_start (args, format); | 484 | va_start (args, format); |
485 | ret = VSNPRINTF (NULL, 0, format, args); | 485 | ret = VSNPRINTF (NULL, 0, format, args); |
486 | va_end (args); | 486 | va_end (args); |
487 | GNUNET_assert (ret >= 0); | ||
487 | *buf = GNUNET_malloc (ret + 1); | 488 | *buf = GNUNET_malloc (ret + 1); |
488 | va_start (args, format); | 489 | va_start (args, format); |
489 | ret = VSPRINTF (*buf, format, args); | 490 | ret = VSPRINTF (*buf, format, args); |
diff --git a/src/util/configuration.c b/src/util/configuration.c index 7f1d98902..25eeaf80f 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c | |||
@@ -421,7 +421,6 @@ GNUNET_CONFIGURATION_serialize (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
421 | size_t m_size; | 421 | size_t m_size; |
422 | size_t c_size; | 422 | size_t c_size; |
423 | 423 | ||
424 | |||
425 | /* Pass1 : calculate the buffer size required */ | 424 | /* Pass1 : calculate the buffer size required */ |
426 | m_size = 0; | 425 | m_size = 0; |
427 | for (sec = cfg->sections; NULL != sec; sec = sec->next) | 426 | for (sec = cfg->sections; NULL != sec; sec = sec->next) |