summaryrefslogtreecommitdiffstats
path: root/pimd/pim_oil.c
diff options
context:
space:
mode:
authorSarita Patra <saritap@vmware.com>2019-02-22 12:05:29 +0100
committerSarita Patra <saritap@vmware.com>2019-02-25 06:30:06 +0100
commit732c209c985da005791fcc3ecd88c443c7c74cd6 (patch)
tree5e1b777647fc7d2c1058e9c4b60227769aa36218 /pimd/pim_oil.c
parentpimd: Handling Null incoming interface of dummy upstream (diff)
downloadfrr-732c209c985da005791fcc3ecd88c443c7c74cd6.tar.xz
frr-732c209c985da005791fcc3ecd88c443c7c74cd6.zip
pimd: create dummy (*,G) upstream when RP not configured/reachable
In this commit, we are creating a dummy upstream & dummy channel_oil for (*, G) when RP is not configured or not reachable. Dummy upstream: <upstream_addr = INADDR_ANY, rpf = Unknown> Dummy channel oil: <iif = MAXVIFS> Signed-off-by: Sarita Patra <saritap@vmware.com>
Diffstat (limited to 'pimd/pim_oil.c')
-rw-r--r--pimd/pim_oil.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/pimd/pim_oil.c b/pimd/pim_oil.c
index 2e12d728c..5042db8e5 100644
--- a/pimd/pim_oil.c
+++ b/pimd/pim_oil.c
@@ -168,13 +168,15 @@ struct channel_oil *pim_channel_oil_add(struct pim_instance *pim,
return c_oil;
}
- ifp = pim_if_find_by_vif_index(pim, input_vif_index);
- if (!ifp) {
- /* warning only */
- zlog_warn(
- "%s: (S,G)=%s could not find input interface for input_vif_index=%d",
- __PRETTY_FUNCTION__, pim_str_sg_dump(sg),
- input_vif_index);
+ if (input_vif_index != MAXVIFS) {
+ ifp = pim_if_find_by_vif_index(pim, input_vif_index);
+ if (!ifp) {
+ /* warning only */
+ zlog_warn(
+ "%s: (S,G)=%s could not find input interface for input_vif_index=%d",
+ __PRETTY_FUNCTION__, pim_str_sg_dump(sg),
+ input_vif_index);
+ }
}
c_oil = XCALLOC(MTYPE_PIM_CHANNEL_OIL, sizeof(*c_oil));
@@ -188,6 +190,10 @@ struct channel_oil *pim_channel_oil_add(struct pim_instance *pim,
c_oil->installed = 0;
c_oil->up = pim_upstream_find(pim, sg);
c_oil->pim = pim;
+ if (input_vif_index != MAXVIFS)
+ c_oil->is_valid = 1;
+ else
+ c_oil->is_valid = 0;
listnode_add_sort(pim->channel_oil_list, c_oil);