summaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_neighbours.c
diff options
context:
space:
mode:
authorDavid Barksdale <amatus.amongus@gmail.com>2015-06-27 23:21:04 +0000
committerDavid Barksdale <amatus.amongus@gmail.com>2015-06-27 23:21:04 +0000
commitab37ad67d7347feafdcba9635cc290bf85e7b728 (patch)
tree847f57cee49b14e24ab61dc591e97522aa92b11b /src/transport/gnunet-service-transport_neighbours.c
parent2eed057f8535501052b2335bc3f0a362197ad617 (diff)
Change NPE into GNUNET_break (0)
See issue #3693
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index d8da8235b..a0f9e1fd7 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -3554,6 +3554,18 @@ GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message,
GNUNET_TRANSPORT_PS_CONNECTED,
GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT));
+ if (NULL == n->primary_address.address) {
+ /* See issue #3693.
+ * We are in state = PSY_SYN_RECV_ACK or ack_state = ACK_SEND_ACK, which
+ * really means we did try (and succeed) to send a SYN and are waiting for
+ * an ACK.
+ * That suggests that the primary_address used to be non-NULL, but maybe it
+ * got reset to NULL without the state being changed appropriately?
+ */
+ GNUNET_break (0);
+ return GNUNET_OK;
+ }
+
/* Reset backoff for primary address */
GST_ats_block_reset (n->primary_address.address,
n->primary_address.session);