summaryrefslogtreecommitdiff
path: root/pimd/pim_hello.c
diff options
context:
space:
mode:
authorsaravanank <saravanank@vmware.com>2019-05-04 11:53:09 -0700
committersaravanank <saravanank@vmware.com>2019-05-14 21:42:22 -0700
commit6bb2ef3595b569336c31d48e95bfdbb036804d29 (patch)
tree8313fb026143b6e22f3a456647053faeb11be158 /pimd/pim_hello.c
parent40270c350bfb05ba3cf5c6915278887fbf8e6032 (diff)
pimd: Forwarding the stored BSM to new neighbor or restarted neighbor
Signed-off-by: Saravanan K <saravanank@vmware.com>
Diffstat (limited to 'pimd/pim_hello.c')
-rw-r--r--pimd/pim_hello.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/pimd/pim_hello.c b/pimd/pim_hello.c
index e482d321a4..721d153d76 100644
--- a/pimd/pim_hello.c
+++ b/pimd/pim_hello.c
@@ -31,6 +31,7 @@
#include "pim_iface.h"
#include "pim_neighbor.h"
#include "pim_upstream.h"
+#include "pim_bsm.h"
static void on_trace(const char *label, struct interface *ifp,
struct in_addr src)
@@ -367,6 +368,12 @@ int pim_hello_recv(struct interface *ifp, struct in_addr src_addr,
}
FREE_ADDR_LIST_THEN_RETURN(-8);
}
+ /* Forward BSM if required */
+ if (!pim_bsm_new_nbr_fwd(neigh, ifp)) {
+ if (PIM_DEBUG_PIM_HELLO)
+ zlog_debug("%s: forwarding bsm to new nbr failed",
+ __PRETTY_FUNCTION__);
+ }
/* actual addr list has been saved under neighbor */
return 0;
@@ -420,6 +427,12 @@ int pim_hello_recv(struct interface *ifp, struct in_addr src_addr,
}
FREE_ADDR_LIST_THEN_RETURN(-9);
}
+ /* Forward BSM if required */
+ if (!pim_bsm_new_nbr_fwd(neigh, ifp)) {
+ if (PIM_DEBUG_PIM_HELLO)
+ zlog_debug("%s: forwarding bsm to new nbr failed",
+ __PRETTY_FUNCTION__);
+ }
/* actual addr list is saved under neighbor */
return 0;