diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-05-02 10:37:04 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-05-02 10:37:04 -0400 |
| commit | 859ea2dea0d46c6a67897b019e5aa6c9d5dcd83d (patch) | |
| tree | a8f622ea44f1a32595742beac011867aba19047a /pimd/pim_cmd.c | |
| parent | f6c8a6d7bcb87239251ead987e5b169e564410ab (diff) | |
pimd: Stop crash in show of single interface
There exists a possiblity that we have upstream data but
at this point in time the rpf failed because there is no
path. As such the rpf interface will be NULL and we
should not necessarily trust it. Prevent a crash
Ticket: CM-24857
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_cmd.c')
| -rw-r--r-- | pimd/pim_cmd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 9c1cb38012..cb2ba87ec6 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -1207,6 +1207,8 @@ static void pim_show_interfaces_single(struct pim_instance *pim, print_header = 1; for (ALL_LIST_ELEMENTS_RO(pim->upstream_list, upnode, up)) { + if (!up->rpf.source_nexthop.interface) + continue; if (strcmp(ifp->name, up->rpf.source_nexthop |
