diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-06-14 02:03:08 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-06-20 01:13:10 +0200 |
commit | 9e132a491a82c5d4d23e080ffb4c124ac3c6f6dc (patch) | |
tree | ec1f8db9058fa2a9daf0a3fe1c400c85b9afb856 /pimd/pim_upstream.c | |
parent | pimd: ALLOC functions cannot fail. (diff) | |
download | frr-9e132a491a82c5d4d23e080ffb4c124ac3c6f6dc.tar.xz frr-9e132a491a82c5d4d23e080ffb4c124ac3c6f6dc.zip |
pimd: Ensure channel_oil_add is created through all paths
If we create a channel_oil ensure that all paths that
we can go down will create one. Future commits
can remove the (up->channel_oil) tests.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_upstream.c')
-rw-r--r-- | pimd/pim_upstream.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 2e6c5c780..194fb2cff 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -770,6 +770,18 @@ static struct pim_upstream *pim_upstream_new(struct pim_instance *pim, up->channel_oil = pim_channel_oil_add( pim, &up->sg, pim_ifp->mroute_vif_index, __PRETTY_FUNCTION__); + else { + /* + * Yeah this should not happen + * but let's be sure that we are not + * doing something stupid, all paths + * through upstream creation will + * create a channel oil + */ + up->channel_oil = pim_channel_oil_add( + pim, &up->sg, MAXVIFS, + __PRETTY_FUNCTION__); + } } } |