diff options
author | Mobashshera Rasool <mrasool@vmware.com> | 2021-10-01 09:36:10 +0200 |
---|---|---|
committer | Mobashshera Rasool <mrasool@vmware.com> | 2021-10-04 07:04:34 +0200 |
commit | 79992e8a4257c35a1d255c24aa3b2df2f8b80b96 (patch) | |
tree | 17dd52a0799dac9ece8c49c465b9428ee3169c01 /pimd/pim_iface.c | |
parent | Merge pull request #9714 from idryzhov/bgp-ext-comm-doc (diff) | |
download | frr-79992e8a4257c35a1d255c24aa3b2df2f8b80b96.tar.xz frr-79992e8a4257c35a1d255c24aa3b2df2f8b80b96.zip |
pimd: Add a flag to decide PIM has to send Hello
Problem Statement:
==================
pim maintains two counters hello tx and hello rx at interface level.
At present pim needs to send the hello message prior to other pim
message as per RFC. This logic is getting derived from the tx hello
counters. So when a new neighbor is added, tx counters are set to
zero and then based on this, it is further decided to send hello in
pim_hello_require function.
Fix:
====
Separating the hello statistics and the logic to decide when to send hello
based on a new flag. pim_ifstat_hello_sent will be used to note down
the hello stats while a new flag is added to decide whether to send hello
or not if it is the first packet to a neighbor.
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Diffstat (limited to 'pimd/pim_iface.c')
-rw-r--r-- | pimd/pim_iface.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index eb19cf4dd..4b87bde28 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -290,6 +290,7 @@ static void pim_addr_change(struct interface *ifp) -- FIXME See TODO T31 */ pim_ifp->pim_ifstat_hello_sent = 0; /* reset hello counter */ + PIM_IF_FLAG_UNSET_HELLO_SENT(pim_ifp->flags); if (pim_ifp->pim_sock_fd < 0) return; pim_hello_restart_now(ifp); /* send hello and restart timer */ @@ -1697,8 +1698,10 @@ int pim_ifp_down(struct interface *ifp) } } - if (ifp->info) + if (ifp->info) { pim_if_del_vif(ifp); + pim_ifstat_reset(ifp); + } return 0; } |