From 5798e5acb5eb5dd7cef93022ba45cf9653a3c2f6 Mon Sep 17 00:00:00 2001 From: Jeremy Lakeman Date: Tue, 11 Dec 2012 13:32:02 +1030 Subject: [PATCH] Always send scan packets with full sid --- overlay_mdp_services.c | 4 +--- overlay_packet.h | 1 + overlay_queue.c | 2 ++ tests/routing | 3 +++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/overlay_mdp_services.c b/overlay_mdp_services.c index 865033e0..40b15336 100644 --- a/overlay_mdp_services.c +++ b/overlay_mdp_services.c @@ -340,11 +340,9 @@ int overlay_send_probe(struct subscriber *peer, struct sockaddr_in addr, overlay frame->flags=PACKET_UNICAST; frame->interface=interface; frame->payload = ob_new(); - + frame->source_full = 1; // TODO call mdp payload encryption / signing without calling overlay_mdp_dispatch... - my_subscriber->send_full=1; - if (peer) peer->last_probe=gettime_ms(); diff --git a/overlay_packet.h b/overlay_packet.h index a5a6f5e9..19bcf041 100644 --- a/overlay_packet.h +++ b/overlay_packet.h @@ -47,6 +47,7 @@ struct overlay_frame { struct subscriber *destination; struct subscriber *next_hop; + int source_full; struct subscriber *source; /* IPv4 address the frame was received from, or should be sent to */ diff --git a/overlay_queue.c b/overlay_queue.c index 044c43c7..dd25dc0b 100644 --- a/overlay_queue.c +++ b/overlay_queue.c @@ -403,6 +403,8 @@ overlay_stuff_packet(struct outgoing_packet *packet, overlay_txqueue *queue, tim } if (!packet->buffer){ + if (frame->source_full) + my_subscriber->send_full=1; overlay_init_packet(packet, frame->next_hop, frame->flags, frame->interface, frame->recvaddr, 0); }else{ // is this packet going our way? diff --git a/tests/routing b/tests/routing index d2972ddd..0a866f56 100755 --- a/tests/routing +++ b/tests/routing @@ -108,6 +108,9 @@ setup_scan() { assert_no_servald_processes foreach_instance +A +B create_single_identity foreach_instance +A +B add_interface 1 + set_instance +B + executeOk_servald config \ + set interfaces.1.dummy_address 127.0.1.11 foreach_instance +A +B \ executeOk_servald config \ set interfaces.1.dummy_filter_broadcasts 1