diff options
-rw-r--r-- | src/transport/gnunet-service-transport_ats.c | 36 | ||||
-rw-r--r-- | src/transport/transport_api.c | 3 |
2 files changed, 38 insertions, 1 deletions
diff --git a/src/transport/gnunet-service-transport_ats.c b/src/transport/gnunet-service-transport_ats.c index d6bc836d3..faf97c8fe 100644 --- a/src/transport/gnunet-service-transport_ats.c +++ b/src/transport/gnunet-service-transport_ats.c | |||
@@ -332,6 +332,11 @@ GST_ats_block_address (const struct GNUNET_HELLO_Address *address, | |||
332 | { | 332 | { |
333 | struct AddressInfo *ai; | 333 | struct AddressInfo *ai; |
334 | 334 | ||
335 | if (0 == | ||
336 | memcmp (&GST_my_identity, | ||
337 | &address->peer, | ||
338 | sizeof (struct GNUNET_PeerIdentity))) | ||
339 | return; /* our own, ignore! */ | ||
335 | ai = find_ai (address, | 340 | ai = find_ai (address, |
336 | session); | 341 | session); |
337 | if (NULL == ai) | 342 | if (NULL == ai) |
@@ -399,6 +404,11 @@ GST_ats_block_reset (const struct GNUNET_HELLO_Address *address, | |||
399 | { | 404 | { |
400 | struct AddressInfo *ai; | 405 | struct AddressInfo *ai; |
401 | 406 | ||
407 | if (0 == | ||
408 | memcmp (&GST_my_identity, | ||
409 | &address->peer, | ||
410 | sizeof (struct GNUNET_PeerIdentity))) | ||
411 | return; /* our own, ignore! */ | ||
402 | ai = find_ai (address, session); | 412 | ai = find_ai (address, session); |
403 | if (NULL == ai) | 413 | if (NULL == ai) |
404 | { | 414 | { |
@@ -429,6 +439,12 @@ GST_ats_add_inbound_address (const struct GNUNET_HELLO_Address *address, | |||
429 | struct GNUNET_ATS_AddressRecord *ar; | 439 | struct GNUNET_ATS_AddressRecord *ar; |
430 | struct AddressInfo *ai; | 440 | struct AddressInfo *ai; |
431 | 441 | ||
442 | if (0 == | ||
443 | memcmp (&GST_my_identity, | ||
444 | &address->peer, | ||
445 | sizeof (struct GNUNET_PeerIdentity))) | ||
446 | return; /* our own, ignore! */ | ||
447 | |||
432 | /* Sanity checks for a valid inbound address */ | 448 | /* Sanity checks for a valid inbound address */ |
433 | if (NULL == address->transport_name) | 449 | if (NULL == address->transport_name) |
434 | { | 450 | { |
@@ -487,6 +503,11 @@ GST_ats_add_address (const struct GNUNET_HELLO_Address *address, | |||
487 | struct GNUNET_ATS_AddressRecord *ar; | 503 | struct GNUNET_ATS_AddressRecord *ar; |
488 | struct AddressInfo *ai; | 504 | struct AddressInfo *ai; |
489 | 505 | ||
506 | if (0 == | ||
507 | memcmp (&GST_my_identity, | ||
508 | &address->peer, | ||
509 | sizeof (struct GNUNET_PeerIdentity))) | ||
510 | return; /* our own, ignore! */ | ||
490 | /* validadte address */ | 511 | /* validadte address */ |
491 | if (NULL == address->transport_name) | 512 | if (NULL == address->transport_name) |
492 | { | 513 | { |
@@ -537,6 +558,11 @@ GST_ats_new_session (const struct GNUNET_HELLO_Address *address, | |||
537 | { | 558 | { |
538 | struct AddressInfo *ai; | 559 | struct AddressInfo *ai; |
539 | 560 | ||
561 | if (0 == | ||
562 | memcmp (&GST_my_identity, | ||
563 | &address->peer, | ||
564 | sizeof (struct GNUNET_PeerIdentity))) | ||
565 | return; /* our own, ignore! */ | ||
540 | ai = find_ai (address, NULL); | 566 | ai = find_ai (address, NULL); |
541 | if (NULL == ai) | 567 | if (NULL == ai) |
542 | { | 568 | { |
@@ -615,6 +641,11 @@ GST_ats_del_session (const struct GNUNET_HELLO_Address *address, | |||
615 | { | 641 | { |
616 | struct AddressInfo *ai; | 642 | struct AddressInfo *ai; |
617 | 643 | ||
644 | if (0 == | ||
645 | memcmp (&GST_my_identity, | ||
646 | &address->peer, | ||
647 | sizeof (struct GNUNET_PeerIdentity))) | ||
648 | return; /* our own, ignore! */ | ||
618 | if (NULL == session) | 649 | if (NULL == session) |
619 | { | 650 | { |
620 | GNUNET_break (0); | 651 | GNUNET_break (0); |
@@ -828,6 +859,11 @@ GST_ats_expire_address (const struct GNUNET_HELLO_Address *address) | |||
828 | { | 859 | { |
829 | struct AddressInfo *ai; | 860 | struct AddressInfo *ai; |
830 | 861 | ||
862 | if (0 == | ||
863 | memcmp (&GST_my_identity, | ||
864 | &address->peer, | ||
865 | sizeof (struct GNUNET_PeerIdentity))) | ||
866 | return; /* our own, ignore! */ | ||
831 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 867 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
832 | "Address %s of peer %s expired\n", | 868 | "Address %s of peer %s expired\n", |
833 | GST_plugins_a2s (address), | 869 | GST_plugins_a2s (address), |
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index e84ef9898..55caf407a 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -990,7 +990,8 @@ transport_notify_ready (void *cls, | |||
990 | if (th->notify_size + sizeof (struct OutboundMessage) > size) | 990 | if (th->notify_size + sizeof (struct OutboundMessage) > size) |
991 | break; /* does not fit */ | 991 | break; /* does not fit */ |
992 | if (GNUNET_BANDWIDTH_tracker_get_delay | 992 | if (GNUNET_BANDWIDTH_tracker_get_delay |
993 | (&n->out_tracker, th->notify_size).rel_value_us > 0) | 993 | (&n->out_tracker, |
994 | th->notify_size).rel_value_us > 0) | ||
994 | break; /* too early */ | 995 | break; /* too early */ |
995 | GNUNET_assert (n == GNUNET_CONTAINER_heap_remove_root (h->ready_heap)); | 996 | GNUNET_assert (n == GNUNET_CONTAINER_heap_remove_root (h->ready_heap)); |
996 | n->hn = NULL; | 997 | n->hn = NULL; |