diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-09-21 22:11:53 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-09-21 22:11:53 +0000 |
| commit | 844ec28cee41395cdd1cc0cdf8cf0168f9dc1adf (patch) | |
| tree | f2fe0a9a71bb075a5f6f43cd992b89f46b95574f /pimd/pim_upstream.c | |
| parent | d0bfb22c223d645e554290ca82581eb06f94ac3b (diff) | |
| parent | 039dc61292de5f3ed5f46316b1940ab6bb184c3f (diff) | |
Merge branch 'cmaster-next' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Conflicts:
lib/.gitignore
lib/command.c
lib/command.h
Diffstat (limited to 'pimd/pim_upstream.c')
| -rw-r--r-- | pimd/pim_upstream.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index cb2619abb7..8267885756 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -59,7 +59,7 @@ static void upstream_channel_oil_detach(struct pim_upstream *up) { if (up->channel_oil) { pim_channel_oil_del(up->channel_oil); - up->channel_oil = 0; + up->channel_oil = NULL; } } @@ -715,12 +715,29 @@ pim_upstream_keep_alive_timer (struct thread *t) up = THREAD_ARG(t); - pim_br_clear_pmbr (up->source_addr, up->group_addr); - /* - * We need to do more here :) - * But this is the start. - */ + if (I_am_RP (up->group_addr)) + { + pim_br_clear_pmbr (up->source_addr, up->group_addr); + /* + * We need to do more here :) + * But this is the start. + */ + } + else + { + pim_mroute_update_counters (up->channel_oil); + if (up->channel_oil->cc.oldpktcnt >= up->channel_oil->cc.pktcnt) + { + pim_mroute_del (up->channel_oil); + pim_upstream_delete (up); + } + else + { + up->t_ka_timer = NULL; + pim_upstream_keep_alive_timer_start (up, PIM_KEEPALIVE_PERIOD); + } + } return 1; } |
