diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-04-14 11:09:47 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-04-14 11:09:47 +0000 |
commit | 5954585b60ab08ad8cd871122bf9788f77b83127 (patch) | |
tree | b6312bb7d43d50754568dc91594bf978073a1844 /src/mesh | |
parent | 460e081570826a49e7859f714bb5cec113a2ece0 (diff) | |
download | gnunet-5954585b60ab08ad8cd871122bf9788f77b83127.tar.gz gnunet-5954585b60ab08ad8cd871122bf9788f77b83127.zip |
Notify neighbors if received messages about unknown connections, implements #3378.
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/gnunet-service-mesh_connection.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index b5ea62054..e75a35645 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c | |||
@@ -1690,6 +1690,7 @@ GMC_handle_confirm (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1690 | GNUNET_STATISTICS_update (stats, "# control on unknown connection", | 1690 | GNUNET_STATISTICS_update (stats, "# control on unknown connection", |
1691 | 1, GNUNET_NO); | 1691 | 1, GNUNET_NO); |
1692 | LOG (GNUNET_ERROR_TYPE_DEBUG, " don't know the connection!\n"); | 1692 | LOG (GNUNET_ERROR_TYPE_DEBUG, " don't know the connection!\n"); |
1693 | send_broken_unknown (&msg->cid, &my_full_id, NULL, peer); | ||
1693 | return GNUNET_OK; | 1694 | return GNUNET_OK; |
1694 | } | 1695 | } |
1695 | 1696 | ||
@@ -1955,6 +1956,7 @@ handle_mesh_encrypted (const struct GNUNET_PeerIdentity *peer, | |||
1955 | GNUNET_STATISTICS_update (stats, "# unknown connection", 1, GNUNET_NO); | 1956 | GNUNET_STATISTICS_update (stats, "# unknown connection", 1, GNUNET_NO); |
1956 | LOG (GNUNET_ERROR_TYPE_DEBUG, "enc on unknown connection %s\n", | 1957 | LOG (GNUNET_ERROR_TYPE_DEBUG, "enc on unknown connection %s\n", |
1957 | GNUNET_h2s (GM_h2hc (&msg->cid))); | 1958 | GNUNET_h2s (GM_h2hc (&msg->cid))); |
1959 | send_broken_unknown (&msg->cid, &my_full_id, NULL, peer); | ||
1958 | return GNUNET_OK; | 1960 | return GNUNET_OK; |
1959 | } | 1961 | } |
1960 | 1962 | ||
@@ -2084,6 +2086,7 @@ handle_mesh_kx (const struct GNUNET_PeerIdentity *peer, | |||
2084 | GNUNET_STATISTICS_update (stats, "# unknown connection", 1, GNUNET_NO); | 2086 | GNUNET_STATISTICS_update (stats, "# unknown connection", 1, GNUNET_NO); |
2085 | LOG (GNUNET_ERROR_TYPE_DEBUG, "kx on unknown connection %s\n", | 2087 | LOG (GNUNET_ERROR_TYPE_DEBUG, "kx on unknown connection %s\n", |
2086 | GNUNET_h2s (GM_h2hc (&msg->cid))); | 2088 | GNUNET_h2s (GM_h2hc (&msg->cid))); |
2089 | send_broken_unknown (&msg->cid, &my_full_id, NULL, peer); | ||
2087 | return GNUNET_OK; | 2090 | return GNUNET_OK; |
2088 | } | 2091 | } |
2089 | LOG (GNUNET_ERROR_TYPE_DEBUG, " on connection %s\n", GMC_2s (c)); | 2092 | LOG (GNUNET_ERROR_TYPE_DEBUG, " on connection %s\n", GMC_2s (c)); |
@@ -2212,6 +2215,7 @@ GMC_handle_ack (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
2212 | { | 2215 | { |
2213 | GNUNET_STATISTICS_update (stats, "# ack on unknown connection", 1, | 2216 | GNUNET_STATISTICS_update (stats, "# ack on unknown connection", 1, |
2214 | GNUNET_NO); | 2217 | GNUNET_NO); |
2218 | send_broken_unknown (&msg->cid, &my_full_id, NULL, peer); | ||
2215 | return GNUNET_OK; | 2219 | return GNUNET_OK; |
2216 | } | 2220 | } |
2217 | 2221 | ||
@@ -2285,9 +2289,9 @@ GMC_handle_poll (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
2285 | { | 2289 | { |
2286 | GNUNET_STATISTICS_update (stats, "# poll on unknown connection", 1, | 2290 | GNUNET_STATISTICS_update (stats, "# poll on unknown connection", 1, |
2287 | GNUNET_NO); | 2291 | GNUNET_NO); |
2288 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 2292 | LOG (GNUNET_ERROR_TYPE_DEBUG, "POLL message on unknown connection %s!\n", |
2289 | "WARNING POLL message on unknown connection %s!\n", | ||
2290 | GNUNET_h2s (GM_h2hc (&msg->cid))); | 2293 | GNUNET_h2s (GM_h2hc (&msg->cid))); |
2294 | send_broken_unknown (&msg->cid, &my_full_id, NULL, peer); | ||
2291 | return GNUNET_OK; | 2295 | return GNUNET_OK; |
2292 | } | 2296 | } |
2293 | 2297 | ||