diff options
| author | sarita patra <saritap@vmware.com> | 2022-03-01 13:38:01 -0800 |
|---|---|---|
| committer | Sarita Patra <saritap@vmware.com> | 2022-07-07 10:56:45 -0700 |
| commit | 1ae87bdd38e455935a326453149d10c01dbd3851 (patch) | |
| tree | ccd273729c4fd4f346f7792bc4a7e180d59648f2 /pimd/pim_bsm.c | |
| parent | 11e1593f9fe1e2efa45dd0a42607a9be8c690585 (diff) | |
pim6d: add pimv6 support for bsm_hdr
Signed-off-by: sarita patra <saritap@vmware.com>
Diffstat (limited to 'pimd/pim_bsm.c')
| -rw-r--r-- | pimd/pim_bsm.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c index 4a9bd2487a..480445f204 100644 --- a/pimd/pim_bsm.c +++ b/pimd/pim_bsm.c @@ -1281,7 +1281,6 @@ int pim_bsm_process(struct interface *ifp, pim_sgaddr *sg, uint8_t *buf, struct pim_interface *pim_ifp = NULL; struct bsm_frag *bsfrag; struct pim_instance *pim; - char bsr_str[INET_ADDRSTRLEN]; uint16_t frag_tag; bool empty_bsm = false; @@ -1324,11 +1323,10 @@ int pim_bsm_process(struct interface *ifp, pim_sgaddr *sg, uint8_t *buf, } bshdr = (struct bsm_hdr *)(buf + PIM_MSG_HEADER_LEN); - pim_inet4_dump("<bsr?>", bshdr->bsr_addr.addr, bsr_str, - sizeof(bsr_str)); - if (bshdr->hm_len > IPV4_MAX_BITLEN) { - zlog_warn("Bad hashmask length for IPv4; got %hhu, expected value in range 0-32", - bshdr->hm_len); + if (bshdr->hm_len > PIM_MAX_BITLEN) { + zlog_warn( + "Bad hashmask length for %s; got %hhu, expected value in range 0-32", + PIM_AF_NAME, bshdr->hm_len); pim->bsm_dropped++; return -1; } @@ -1371,8 +1369,9 @@ int pim_bsm_process(struct interface *ifp, pim_sgaddr *sg, uint8_t *buf, } else { if (PIM_DEBUG_BSM) zlog_debug( - "%s : nofwd_bsm received on %s when accpt_nofwd_bsm false", - __func__, bsr_str); + "%s : nofwd_bsm received on %pPAs when accpt_nofwd_bsm false", + __func__, + (pim_addr *)&bshdr->bsr_addr.addr); pim->bsm_dropped++; pim_ifp->pim_ifstat_ucast_bsm_cfg_miss++; return -1; @@ -1385,7 +1384,6 @@ int pim_bsm_process(struct interface *ifp, pim_sgaddr *sg, uint8_t *buf, if (0) #endif { -#if PIM_IPV == 4 /* Multicast BSMs are only accepted if source interface & IP * match RPF towards the BSR's IP address, or they have * no-forward set @@ -1394,8 +1392,9 @@ int pim_bsm_process(struct interface *ifp, pim_sgaddr *sg, uint8_t *buf, ifp, sg->src)) { if (PIM_DEBUG_BSM) zlog_debug( - "BSM check: RPF to BSR %s is not %pPA%%%s", - bsr_str, &sg->src, ifp->name); + "BSM check: RPF to BSR %pPAs is not %pPA%%%s", + (pim_addr *)&bshdr->bsr_addr.addr, + &sg->src, ifp->name); pim->bsm_dropped++; return -1; } |
