diff options
Diffstat (limited to 'pimd/pim_bsm.c')
| -rw-r--r-- | pimd/pim_bsm.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c index bcf11aedbd..f55934909a 100644 --- a/pimd/pim_bsm.c +++ b/pimd/pim_bsm.c @@ -601,7 +601,8 @@ static bool is_preferred_bsr(struct pim_instance *pim, struct in_addr bsr, return true; else if (bsr_prio == pim->global_scope.current_bsr_prio) { - if (bsr.s_addr >= pim->global_scope.current_bsr.s_addr) + if (ntohl(bsr.s_addr) + >= ntohl(pim->global_scope.current_bsr.s_addr)) return true; else return false; @@ -874,6 +875,17 @@ static void pim_bsm_fwd_whole_sz(struct pim_instance *pim, uint8_t *buf, pim_ifp = ifp->info; if ((!pim_ifp) || (!pim_ifp->bsm_enable)) continue; + + /* + * RFC 5059 Sec 3.4: + * When a Bootstrap message is forwarded, it is forwarded out + * of every multicast-capable interface that has PIM neighbors. + * + * So skipping pim interfaces with no neighbors. + */ + if (listcount(pim_ifp->pim_neighbor_list) == 0) + continue; + pim_hello_require(ifp); pim_mtu = ifp->mtu - MAX_IP_HDR_LEN; if (pim_mtu < len) { |
