mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-11-05 05:22:45 +00:00
pim6d: bsr nht handling for IPV6
Signed-off-by: sarita patra <saritap@vmware.com>
This commit is contained in:
parent
e309769ae7
commit
53bbfd535a
@ -27,42 +27,3 @@
|
||||
#include "pim_cmd.h"
|
||||
#include "pim_bsm.h"
|
||||
|
||||
/*
|
||||
* NH lookup / NHT
|
||||
*/
|
||||
void pim_nht_bsr_add(struct pim_instance *pim, struct in_addr addr)
|
||||
{
|
||||
}
|
||||
|
||||
void pim_nht_bsr_del(struct pim_instance *pim, struct in_addr addr)
|
||||
{
|
||||
}
|
||||
|
||||
bool pim_bsm_new_nbr_fwd(struct pim_neighbor *neigh, struct interface *ifp)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void pim_bsm_proc_free(struct pim_instance *pim)
|
||||
{
|
||||
}
|
||||
|
||||
void pim_bsm_proc_init(struct pim_instance *pim)
|
||||
{
|
||||
}
|
||||
|
||||
struct bsgrp_node *pim_bsm_get_bsgrp_node(struct bsm_scope *scope,
|
||||
struct prefix *grp)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void pim_bsm_write_config(struct vty *vty, struct interface *ifp)
|
||||
{
|
||||
}
|
||||
|
||||
int pim_bsm_process(struct interface *ifp, pim_sgaddr *sg, uint8_t *buf,
|
||||
uint32_t buf_size, bool no_fwd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1388,6 +1388,7 @@ 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
|
||||
|
||||
@ -163,8 +163,7 @@ int pim_find_or_track_nexthop(struct pim_instance *pim, pim_addr addr,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if PIM_IPV == 4
|
||||
void pim_nht_bsr_add(struct pim_instance *pim, struct in_addr addr)
|
||||
void pim_nht_bsr_add(struct pim_instance *pim, pim_addr addr)
|
||||
{
|
||||
struct pim_nexthop_cache *pnc;
|
||||
|
||||
@ -172,7 +171,6 @@ void pim_nht_bsr_add(struct pim_instance *pim, struct in_addr addr)
|
||||
|
||||
pnc->bsr_count++;
|
||||
}
|
||||
#endif /* PIM_IPV == 4 */
|
||||
|
||||
static void pim_nht_drop_maybe(struct pim_instance *pim,
|
||||
struct pim_nexthop_cache *pnc)
|
||||
@ -242,8 +240,7 @@ void pim_delete_tracked_nexthop(struct pim_instance *pim, pim_addr addr,
|
||||
pim_nht_drop_maybe(pim, pnc);
|
||||
}
|
||||
|
||||
#if PIM_IPV == 4
|
||||
void pim_nht_bsr_del(struct pim_instance *pim, struct in_addr addr)
|
||||
void pim_nht_bsr_del(struct pim_instance *pim, pim_addr addr)
|
||||
{
|
||||
struct pim_nexthop_cache *pnc = NULL;
|
||||
struct pim_nexthop_cache lookup;
|
||||
@ -253,7 +250,7 @@ void pim_nht_bsr_del(struct pim_instance *pim, struct in_addr addr)
|
||||
* is 0.0.0.0 as that the BSR has not been registered
|
||||
* for tracking yet.
|
||||
*/
|
||||
if (addr.s_addr == INADDR_ANY)
|
||||
if (pim_addr_is_any(addr))
|
||||
return;
|
||||
|
||||
lookup.rpf.rpf_addr = addr;
|
||||
@ -261,18 +258,18 @@ void pim_nht_bsr_del(struct pim_instance *pim, struct in_addr addr)
|
||||
pnc = hash_lookup(pim->rpf_hash, &lookup);
|
||||
|
||||
if (!pnc) {
|
||||
zlog_warn("attempting to delete nonexistent NHT BSR entry %pI4",
|
||||
zlog_warn("attempting to delete nonexistent NHT BSR entry %pPA",
|
||||
&addr);
|
||||
return;
|
||||
}
|
||||
|
||||
assertf(pnc->bsr_count > 0, "addr=%pI4", &addr);
|
||||
assertf(pnc->bsr_count > 0, "addr=%pPA", &addr);
|
||||
pnc->bsr_count--;
|
||||
|
||||
pim_nht_drop_maybe(pim, pnc);
|
||||
}
|
||||
|
||||
bool pim_nht_bsr_rpf_check(struct pim_instance *pim, struct in_addr bsr_addr,
|
||||
bool pim_nht_bsr_rpf_check(struct pim_instance *pim, pim_addr bsr_addr,
|
||||
struct interface *src_ifp, pim_addr src_ip)
|
||||
{
|
||||
struct pim_nexthop_cache *pnc = NULL;
|
||||
@ -392,7 +389,6 @@ bool pim_nht_bsr_rpf_check(struct pim_instance *pim, struct in_addr bsr_addr,
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif /* PIM_IPV == 4 */
|
||||
|
||||
void pim_rp_nexthop_del(struct rp_info *rp_info)
|
||||
{
|
||||
|
||||
@ -72,10 +72,10 @@ int pim_ecmp_fib_lookup_if_vif_index(struct pim_instance *pim, pim_addr src,
|
||||
void pim_rp_nexthop_del(struct rp_info *rp_info);
|
||||
|
||||
/* for RPF check on BSM message receipt */
|
||||
void pim_nht_bsr_add(struct pim_instance *pim, struct in_addr bsr_addr);
|
||||
void pim_nht_bsr_del(struct pim_instance *pim, struct in_addr bsr_addr);
|
||||
void pim_nht_bsr_add(struct pim_instance *pim, pim_addr bsr_addr);
|
||||
void pim_nht_bsr_del(struct pim_instance *pim, pim_addr bsr_addr);
|
||||
/* RPF(bsr_addr) == src_ip%src_ifp? */
|
||||
bool pim_nht_bsr_rpf_check(struct pim_instance *pim, struct in_addr bsr_addr,
|
||||
bool pim_nht_bsr_rpf_check(struct pim_instance *pim, pim_addr bsr_addr,
|
||||
struct interface *src_ifp, pim_addr src_ip);
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user