diff options
Diffstat (limited to 'pimd/pim_assert.c')
| -rw-r--r-- | pimd/pim_assert.c | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/pimd/pim_assert.c b/pimd/pim_assert.c index f2bfb846dd..37515cee59 100644 --- a/pimd/pim_assert.c +++ b/pimd/pim_assert.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING; if not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; see the file COPYING; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #include <zebra.h> @@ -230,6 +229,7 @@ int pim_assert_recv(struct interface *ifp, int offset; uint8_t *curr; int curr_size; + struct pim_interface *pim_ifp = NULL; on_trace(__PRETTY_FUNCTION__, ifp, src_addr); @@ -311,6 +311,10 @@ int pim_assert_recv(struct interface *ifp, msg_metric.ip_address = src_addr; + pim_ifp = ifp->info; + zassert(pim_ifp); + ++pim_ifp->pim_ifstat_assert_recv; + return dispatch_assert(ifp, msg_source_addr.u.prefix4, sg.grp, @@ -473,6 +477,7 @@ static int pim_assert_do(struct pim_ifchannel *ch, metric.route_metric, PIM_FORCE_BOOLEAN(metric.rpt_bit_flag)); } + ++pim_ifp->pim_ifstat_assert_send; if (pim_msg_send(pim_ifp->pim_sock_fd, pim_ifp->primary_address, @@ -570,9 +575,8 @@ static void pim_assert_timer_set(struct pim_ifchannel *ch, ch->sg_str, interval, ch->interface->name); } - THREAD_TIMER_ON(master, ch->t_ifassert_timer, - on_assert_timer, - ch, interval); + thread_add_timer(master, on_assert_timer, ch, interval, + &ch->t_ifassert_timer); } static void pim_assert_timer_reset(struct pim_ifchannel *ch) |
