pimd: restart the ka timer after the sa adv timer

To avoid unnecessary ka activity in the network. When the SA
advertisment timer fires we build SA TLVs and send them to peers. As a
part of this tx we were also restarting the ka timer to avoid
unnecessary ka generation in the next 60 seconds. However because the
adv timer was restarted after tx (i.e. after ka restart) ka timer would
always endup firing just before the adv timer.
This commit is contained in:
anuradhak 2016-12-01 15:46:36 -08:00 committed by Donald Sharp
parent 52d8f0d84f
commit 69053fb4f0
2 changed files with 5 additions and 2 deletions

View File

@ -73,8 +73,8 @@ pim_msdp_sa_adv_timer_cb(struct thread *t)
zlog_debug("MSDP SA advertisment timer expired");
}
pim_msdp_pkt_sa_tx();
pim_msdp_sa_adv_timer_setup(true /* start */);
pim_msdp_pkt_sa_tx();
return 0;
}
static void
@ -974,6 +974,9 @@ pim_msdp_peer_pkt_txed(struct pim_msdp_peer *mp)
{
if (mp->state == PIM_MSDP_ESTABLISHED) {
pim_msdp_peer_ka_timer_setup(mp, true /* start */);
if (PIM_DEBUG_MSDP_INTERNAL) {
zlog_debug("MSDP ka timer restart on pkt tx to %s", mp->key_str);
}
}
}

View File

@ -194,7 +194,7 @@ pim_msdp_write(struct thread *thread)
enum pim_msdp_tlv type;
int len;
int work_cnt = 0;
int work_max_cnt = 1;
int work_max_cnt = 12;
mp = THREAD_ARG(thread);
mp->t_write = NULL;