diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-06-15 01:01:46 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-06-15 01:01:46 +0200 |
commit | 9bf5f19cae44fcd2e9d9b243a81f7cd9be5c49ce (patch) | |
tree | 45cfd47f1cb4768aee794220171c75b232cfcdba /pimd/pim_oil.c | |
parent | lib: Prevent infinite loop in fd handling (#4516) (diff) | |
download | frr-9bf5f19cae44fcd2e9d9b243a81f7cd9be5c49ce.tar.xz frr-9bf5f19cae44fcd2e9d9b243a81f7cd9be5c49ce.zip |
pimd: Display ifp name in pim_channel_oil_dump
The vifi being displayed is just confusing. Display the
actual interface name being used in the mroute.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_oil.c')
-rw-r--r-- | pimd/pim_oil.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pimd/pim_oil.c b/pimd/pim_oil.c index 22045c2d3..033148ea9 100644 --- a/pimd/pim_oil.c +++ b/pimd/pim_oil.c @@ -38,18 +38,22 @@ char *pim_channel_oil_dump(struct channel_oil *c_oil, char *buf, size_t size) { char *out; + struct interface *ifp; struct prefix_sg sg; int i; sg.src = c_oil->oil.mfcc_origin; sg.grp = c_oil->oil.mfcc_mcastgrp; - snprintf(buf, size, "%s IIF: %d, OIFS: ", pim_str_sg_dump(&sg), - c_oil->oil.mfcc_parent); + ifp = pim_if_find_by_vif_index(c_oil->pim, c_oil->oil.mfcc_parent); + snprintf(buf, size, "%s IIF: %s, OIFS: ", pim_str_sg_dump(&sg), + ifp ? ifp->name : "(?)"); out = buf + strlen(buf); for (i = 0; i < MAXVIFS; i++) { if (c_oil->oil.mfcc_ttls[i] != 0) { - snprintf(out, buf + size - out, "%d ", i); + ifp = pim_if_find_by_vif_index(c_oil->pim, i); + snprintf(out, buf + size - out, "%s ", + ifp ? ifp->name : "(?)"); out += strlen(out); } } |