[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r27932 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r27932 - gnunet/src/mesh |
Date: |
Thu, 11 Jul 2013 17:22:27 +0200 |
Author: bartpolot
Date: 2013-07-11 17:22:27 +0200 (Thu, 11 Jul 2013)
New Revision: 27932
Modified:
gnunet/src/mesh/Makefile.am
gnunet/src/mesh/gnunet-service-mesh.c
Log:
- fix use after free
Modified: gnunet/src/mesh/Makefile.am
===================================================================
--- gnunet/src/mesh/Makefile.am 2013-07-11 15:19:09 UTC (rev 27931)
+++ gnunet/src/mesh/Makefile.am 2013-07-11 15:22:27 UTC (rev 27932)
@@ -107,7 +107,8 @@
test_mesh_small_speed_nobuf \
test_mesh_small_speed_backwards \
test_mesh_small_speed_nobuf_backwards \
- test_mesh_small_speed_reliable
+ test_mesh_small_speed_reliable \
+ test_mesh_small_speed_reliable_backwards
endif
ld_mesh_test_lib = \
@@ -171,7 +172,12 @@
test_mesh_small_speed_reliable_LDADD = $(ld_mesh_test_lib)
test_mesh_small_speed_reliable_DEPENDENCIES = $(dep_mesh_test_lib)
+test_mesh_small_speed_reliable_backwards_SOURCES = \
+ test_mesh_small.c
+test_mesh_small_speed_reliable_backwards_LDADD = $(ld_mesh_test_lib)
+test_mesh_small_speed_reliable_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
+
if ENABLE_TEST_RUN
TESTS = \
$(check_PROGRAMS)
Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c 2013-07-11 15:19:09 UTC (rev
27931)
+++ gnunet/src/mesh/gnunet-service-mesh.c 2013-07-11 15:22:27 UTC (rev
27932)
@@ -2334,8 +2334,7 @@
t = rel->t;
copy = rel->head_sent;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! Retransmit \n");
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! id %u\n", copy->id);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! RETRANSMIT %u\n", copy->id);
payload = (struct GNUNET_MESH_Data *) ©[1];
hop = rel == t->fwd_rel ? t->next_hop : t->prev_hop;
@@ -3978,8 +3977,7 @@
return GNUNET_OK;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! ACK \n");
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! ack %u\n", ack);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! ACK %u\n", ack);
for (work = GNUNET_NO, copy = rel->head_sent; copy != NULL; copy = next)
{
struct GNUNET_TIME_Relative time;
@@ -3991,17 +3989,18 @@
}
work = GNUNET_YES;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! id %u\n", copy->id);
- GNUNET_CONTAINER_DLL_remove (rel->head_sent, rel->tail_sent, copy);
next = copy->next;
- GNUNET_free (copy);
time = GNUNET_TIME_absolute_get_duration (copy->timestamp);
rel->expected_delay.rel_value += time.rel_value;
rel->expected_delay.rel_value /= 2;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! new expected delay %s!\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! new expected delay %s\n",
GNUNET_STRINGS_relative_time_to_string (rel->expected_delay,
GNUNET_NO));
rel->retry_timer = rel->expected_delay;
+ GNUNET_CONTAINER_DLL_remove (rel->head_sent, rel->tail_sent, copy);
+ GNUNET_free (copy);
}
+
if (GNUNET_YES == work)
{
if (GNUNET_SCHEDULER_NO_TASK != rel->retry_task)
@@ -4760,6 +4759,7 @@
+ sizeof(struct GNUNET_MESH_Data)
+ size);
copy->id = fc->last_pid_recv + 1;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! DATA %u\n", copy->id);
copy->timestamp = GNUNET_TIME_absolute_get ();
rel = (tid < GNUNET_MESH_LOCAL_TUNNEL_ID_SERV) ? t->fwd_rel : t->bck_rel;
copy->rel = rel;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r27932 - gnunet/src/mesh,
gnunet <=