diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-06-01 21:31:02 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-06-01 21:31:02 +0200 |
commit | f91f89bcd6a7c0b26d9e5b9d7062a29451ab51b5 (patch) | |
tree | b6ea99b4b91e6090f032b5a26388d8f36ac8bbc6 /pimd/pim_static.c | |
parent | zebra: Remove experimental warning (diff) | |
download | frr-f91f89bcd6a7c0b26d9e5b9d7062a29451ab51b5.tar.xz frr-f91f89bcd6a7c0b26d9e5b9d7062a29451ab51b5.zip |
pimd: Add support for displaying ip mroute
When you enter a static mroute under an interface
the 'show run' is not displaying this information.
Add code to allow this.
Ticket: CM-11257
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_static.c')
-rw-r--r-- | pimd/pim_static.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pimd/pim_static.c b/pimd/pim_static.c index 26743b596..5114901da 100644 --- a/pimd/pim_static.c +++ b/pimd/pim_static.c @@ -20,6 +20,10 @@ $QuaggaId: $Format:%an, %ai, %h$ $ */ +#include <zebra.h> + +#include "vty.h" + #include "pim_static.h" #include "pim_time.h" #include "pim_str.h" @@ -303,3 +307,32 @@ int pim_static_del(struct interface *iif, struct interface *oif, struct in_addr return 0; } + +int +pim_static_write_mroute (struct vty *vty, struct interface *ifp) +{ + struct listnode *node; + struct static_route *sroute; + int count = 0; + char sbuf[100]; + char gbuf[100]; + + for (ALL_LIST_ELEMENTS_RO (qpim_static_route_list, node, sroute)) + { + pim_inet4_dump ("<ifaddr?>", sroute->group, gbuf, sizeof (gbuf)); + pim_inet4_dump ("<ifaddr?>", sroute->source, sbuf, sizeof (sbuf)); + if (sroute->iif == ifp->ifindex) + { + int i; + for (i = 0; i < MAXVIFS; i++) + if (sroute->oif_ttls[i]) + { + struct interface *oifp = if_lookup_by_index (i); + vty_out (vty, " ip mroute %s %s %s%s", oifp->name, gbuf, sbuf, VTY_NEWLINE); + count ++; + } + } + } + + return count; +} |