mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-20 05:37:57 +00:00
Drop acked packets sent via unicast links
This commit is contained in:
parent
d7206e10d7
commit
65f1157e1e
15
route_link.c
15
route_link.c
@ -1185,14 +1185,9 @@ int link_received_packet(struct decode_context *context, int sender_seq, char un
|
||||
link->ack_mask = link->ack_mask << 1;
|
||||
link->ack_counter --;
|
||||
|
||||
// if we need to nack promptly
|
||||
// we may need to nack promptly
|
||||
if (neighbour->using_us && link==neighbour->best_link){
|
||||
neighbour->next_neighbour_update = now + 10;
|
||||
|
||||
if (link->ack_counter <=0){
|
||||
neighbour_find_best_link(neighbour);
|
||||
send_neighbour_link(neighbour);
|
||||
}
|
||||
neighbour->next_neighbour_update = now + 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1208,8 +1203,9 @@ int link_received_packet(struct decode_context *context, int sender_seq, char un
|
||||
link->link_timeout = now + (context->interface->destination->tick_ms *5);
|
||||
|
||||
// force an update soon when we need to promptly ack packets
|
||||
if (neighbour->using_us > now && link == neighbour->best_link && link->ack_counter <=0){
|
||||
if (neighbour->using_us && link->ack_counter <=0){
|
||||
neighbour_find_best_link(neighbour);
|
||||
if (link == neighbour->best_link)
|
||||
send_neighbour_link(neighbour);
|
||||
}
|
||||
|
||||
@ -1379,8 +1375,7 @@ int link_receive(struct overlay_frame *frame, overlay_mdp_frame *mdp)
|
||||
|
||||
// process acks / nacks
|
||||
if (ack_seq!=-1){
|
||||
// TODO unicast
|
||||
overlay_queue_ack(sender, interface->destination, ack_mask, ack_seq);
|
||||
overlay_queue_ack(sender, destination, ack_mask, ack_seq);
|
||||
|
||||
// did they miss our last ack?
|
||||
if (neighbour->last_update_seq!=-1){
|
||||
|
Loading…
Reference in New Issue
Block a user