]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Store the pim instance off of the pim interface
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 14 May 2017 18:20:17 +0000 (14:20 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 24 Jul 2017 17:51:34 +0000 (13:51 -0400)
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>
pimd/pim_iface.c
pimd/pim_iface.h

index f3f8605ab7650f0a7557b0512391d2b596cf30df..5e47bb19b050ae73e27492ea3fb52225bb279f49 100644 (file)
@@ -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;
index e742e68f6783011f0db2d833b6a38915ea524be9..9aab43ed93a899f374621f34469b4624bdb42a15 100644 (file)
@@ -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