summaryrefslogtreecommitdiffstats
path: root/pimd/pim_static.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-05-19 00:00:49 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-07-24 19:51:35 +0200
commit72ec4672899d4042c9f7dc2203b2e1771c90ac89 (patch)
tree4dba197ae126cf55697b6ea63215b2605b235a7f /pimd/pim_static.c
parentpimd: If c_oil->pim is set use that pim instance in pim_mroute.c (diff)
downloadfrr-72ec4672899d4042c9f7dc2203b2e1771c90ac89.tar.xz
frr-72ec4672899d4042c9f7dc2203b2e1771c90ac89.zip
pimd: Set c_oil->pim for static routes
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_static.c')
-rw-r--r--pimd/pim_static.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/pimd/pim_static.c b/pimd/pim_static.c
index 7c9aca47a..2d4e2feff 100644
--- a/pimd/pim_static.c
+++ b/pimd/pim_static.c
@@ -77,6 +77,8 @@ static struct static_route *static_route_new(unsigned int iif, unsigned int oif,
int pim_static_add(struct interface *iif, struct interface *oif,
struct in_addr group, struct in_addr source)
{
+ struct pim_instance *pim;
+ struct pim_interface *pim_ifp;
struct listnode *node = NULL;
struct static_route *s_route = NULL;
struct static_route *original_s_route = NULL;
@@ -101,6 +103,13 @@ int pim_static_add(struct interface *iif, struct interface *oif,
return -4;
}
#endif
+ if (iif->vrf_id != oif->vrf_id) {
+ return -3;
+ }
+
+ pim_ifp = iif->info;
+ pim = pim_ifp->pim;
+ s_route->c_oil.pim = pim;
for (ALL_LIST_ELEMENTS_RO(qpim_static_route_list, node, s_route)) {
if (s_route->group.s_addr == group.s_addr