summaryrefslogtreecommitdiff
path: root/pimd/pim_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/pim_vty.c')
-rw-r--r--pimd/pim_vty.c52
1 files changed, 34 insertions, 18 deletions
diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c
index a0dea63b79..6df36d5fc1 100644
--- a/pimd/pim_vty.c
+++ b/pimd/pim_vty.c
@@ -40,6 +40,7 @@
#include "pim_bfd.h"
#include "pim_bsm.h"
#include "pim_vxlan.h"
+#include "pim6_mld.h"
int pim_debug_config_write(struct vty *vty)
{
@@ -65,23 +66,28 @@ int pim_debug_config_write(struct vty *vty)
vty_out(vty, "debug igmp packets\n");
++writes;
}
- if (PIM_DEBUG_IGMP_TRACE) {
+ /* PIM_DEBUG_IGMP_TRACE catches _DETAIL too */
+ if (router->debugs & PIM_MASK_IGMP_TRACE) {
vty_out(vty, "debug igmp trace\n");
++writes;
}
+ if (PIM_DEBUG_IGMP_TRACE_DETAIL) {
+ vty_out(vty, "debug igmp trace detail\n");
+ ++writes;
+ }
- if (PIM_DEBUG_MROUTE) {
+ /* PIM_DEBUG_MROUTE catches _DETAIL too */
+ if (router->debugs & PIM_MASK_MROUTE) {
vty_out(vty, "debug mroute\n");
++writes;
}
-
- if (PIM_DEBUG_MTRACE) {
- vty_out(vty, "debug mtrace\n");
+ if (PIM_DEBUG_MROUTE_DETAIL) {
+ vty_out(vty, "debug mroute detail\n");
++writes;
}
- if (PIM_DEBUG_MROUTE_DETAIL_ONLY) {
- vty_out(vty, "debug mroute detail\n");
+ if (PIM_DEBUG_MTRACE) {
+ vty_out(vty, "debug mtrace\n");
++writes;
}
@@ -102,11 +108,12 @@ int pim_debug_config_write(struct vty *vty)
++writes;
}
- if (PIM_DEBUG_PIM_TRACE) {
+ /* PIM_DEBUG_PIM_TRACE catches _DETAIL too */
+ if (router->debugs & PIM_MASK_PIM_TRACE) {
vty_out(vty, "debug pim trace\n");
++writes;
}
- if (PIM_DEBUG_PIM_TRACE_DETAIL_ONLY) {
+ if (PIM_DEBUG_PIM_TRACE_DETAIL) {
vty_out(vty, "debug pim trace detail\n");
++writes;
}
@@ -264,8 +271,8 @@ int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty)
struct ssmpingd_sock *ss;
++writes;
for (ALL_LIST_ELEMENTS_RO(pim->ssmpingd_list, node, ss)) {
- vty_out(vty, "%sip ssmpingd %pPA\n", spaces,
- &ss->source_addr);
+ vty_out(vty, "%s" PIM_AF_NAME " ssmpingd %pPA\n",
+ spaces, &ss->source_addr);
++writes;
}
}
@@ -285,11 +292,11 @@ int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty)
}
#if PIM_IPV == 4
-static int pim_igmp_config_write(struct vty *vty, int writes,
- struct pim_interface *pim_ifp)
+static int gm_config_write(struct vty *vty, int writes,
+ struct pim_interface *pim_ifp)
{
/* IF ip igmp */
- if (PIM_IF_TEST_IGMP(pim_ifp->options)) {
+ if (pim_ifp->igmp_enable) {
vty_out(vty, " ip igmp\n");
++writes;
}
@@ -354,6 +361,17 @@ static int pim_igmp_config_write(struct vty *vty, int writes,
return writes;
}
+#else
+static int gm_config_write(struct vty *vty, int writes,
+ struct pim_interface *pim_ifp)
+{
+ if (pim_ifp->mld_version != MLD_DEFAULT_VERSION)
+ vty_out(vty, " ipv6 mld version %d\n", pim_ifp->mld_version);
+ if (pim_ifp->gm_default_query_interval != IGMP_GENERAL_QUERY_INTERVAL)
+ vty_out(vty, " ipv6 mld query-interval %d\n",
+ pim_ifp->gm_default_query_interval);
+ return 0;
+}
#endif
int pim_config_write(struct vty *vty, int writes, struct interface *ifp,
@@ -361,7 +379,7 @@ int pim_config_write(struct vty *vty, int writes, struct interface *ifp,
{
struct pim_interface *pim_ifp = ifp->info;
- if (PIM_IF_TEST_PIM(pim_ifp->options)) {
+ if (pim_ifp->pim_enable) {
vty_out(vty, " " PIM_AF_NAME " pim\n");
++writes;
}
@@ -382,9 +400,7 @@ int pim_config_write(struct vty *vty, int writes, struct interface *ifp,
++writes;
}
-#if PIM_IPV == 4
- writes += pim_igmp_config_write(vty, writes, pim_ifp);
-#endif
+ writes += gm_config_write(vty, writes, pim_ifp);
/* update source */
if (!pim_addr_is_any(pim_ifp->update_source)) {