forked from Mirror/frr
pimd: Store the pim instance off of the pim interface
Storing the pim instance off of the pim interface will allow us to easily keep track of vrf information. This is because pretty much is everything is interface based. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
f507c1966e
commit
c3bd5a10f1
|
@ -103,6 +103,7 @@ static void *if_list_clean(struct pim_interface *pim_ifp)
|
|||
struct pim_interface *pim_if_new(struct interface *ifp, int igmp, int pim)
|
||||
{
|
||||
struct pim_interface *pim_ifp;
|
||||
struct vrf *vrf;
|
||||
|
||||
zassert(ifp);
|
||||
zassert(!ifp->info);
|
||||
|
@ -114,6 +115,8 @@ struct pim_interface *pim_if_new(struct interface *ifp, int igmp, int pim)
|
|||
}
|
||||
|
||||
pim_ifp->options = 0;
|
||||
vrf = vrf_info_lookup(ifp->vrf_id);
|
||||
pim_ifp->pim = vrf->info;
|
||||
pim_ifp->mroute_vif_index = -1;
|
||||
|
||||
pim_ifp->igmp_version = IGMP_DEFAULT_VERSION;
|
||||
|
|
|
@ -73,6 +73,8 @@ struct pim_secondary_addr {
|
|||
struct pim_interface {
|
||||
uint32_t options; /* bit vector */
|
||||
ifindex_t mroute_vif_index;
|
||||
struct pim_instance *pim;
|
||||
|
||||
struct in_addr primary_address; /* remember addr to detect change */
|
||||
struct list *sec_addr_list; /* list of struct pim_secondary_addr */
|
||||
struct in_addr update_source; /* user can statically set the primary
|
||||
|
|
Loading…
Reference in a new issue