Don't attempt to retransmit routing link information

This commit is contained in:
Jeremy Lakeman 2015-06-15 15:10:08 +09:30
parent f76dc67c75
commit 9658d4527b
3 changed files with 10 additions and 5 deletions

View File

@ -902,6 +902,8 @@ int _overlay_send_frame(struct __sourceloc whence, struct internal_mdp_header *h
frame->ttl = header->ttl;
frame->queue = header->qos;
frame->type = OF_TYPE_DATA;
frame->resend = header->resend;
if (!(header->crypt_flags & MDP_FLAG_NO_CRYPT))
frame->modifiers |= OF_CRYPTO_CIPHERED;
if (!(header->crypt_flags & MDP_FLAG_NO_SIGN))

View File

@ -53,11 +53,11 @@ struct overlay_frame {
// encrypted? signed?
unsigned int modifiers;
unsigned char ttl;
uint8_t ttl;
// Which QOS queue?
unsigned char queue;
// Should we keep trying until acked?
char resend;
uint8_t queue;
// How many times should we retransmit?
int8_t resend;
// callback and context just before packet sending
void *send_context;
@ -108,6 +108,7 @@ struct internal_mdp_header{
mdp_port_t source_port;
struct subscriber *destination;
mdp_port_t destination_port;
int8_t resend;
uint8_t ttl;
uint8_t qos;
uint8_t crypt_flags; // combination of MDP_FLAG_NO_CRYPT & MDP_FLAG_NO_SIGN flags

View File

@ -849,7 +849,7 @@ static int send_neighbour_link(struct neighbour *n)
frame->send_hook = neighbour_link_sent;
frame->send_context = n->subscriber;
frame->resend=-1;
frame->resend = -1;
if (n->subscriber->reachable & REACHABLE){
frame->destination = n->subscriber;
@ -950,6 +950,8 @@ void link_send(struct sched_ent *alarm)
header.ttl = 1;
header.qos = OQ_MESH_MANAGEMENT;
header.crypt_flags = MDP_FLAG_NO_CRYPT|MDP_FLAG_NO_SIGN;
header.resend = -1;
ob_limitsize(payload, 400);
ob_checkpoint(payload);