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>
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);
}
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;
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