From ed8be33f82543aa07b54bb53dda30bb082bf23b3 Mon Sep 17 00:00:00 2001 From: Jeremy Lakeman Date: Tue, 11 Dec 2012 14:17:01 +1030 Subject: [PATCH] Please explains should be sent in packets with a full sid --- overlay_address.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/overlay_address.c b/overlay_address.c index 75d51ef7..eabaf654 100644 --- a/overlay_address.c +++ b/overlay_address.c @@ -394,9 +394,14 @@ static int add_explain_response(struct subscriber *subscriber, void *context){ } // if one of our identities is unknown, - // the header of our next payload must include our full sid. - if (subscriber->reachable==REACHABLE_SELF) - subscriber->send_full = 1; + // the header of this packet must include our full sid. + if (subscriber->reachable==REACHABLE_SELF){ + subscriber->send_full=1; + if (subscriber==my_subscriber){ + response->please_explain->source_full=1; + return 0; + } + } // add the whole subscriber id to the payload, stop if we run out of space DEBUGF("Adding full sid by way of explanation %s", alloca_tohex_sid(subscriber->sid)); @@ -512,8 +517,8 @@ int send_please_explain(struct decode_context *context, struct subscriber *sourc if (context->interface){ frame->destination_resolved=1; frame->next_hop = destination; - frame->recvaddr=context->addr; - frame->interface=context->interface; + frame->recvaddr = context->addr; + frame->interface = context->interface; } }