summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/user/pimv6.rst8
-rw-r--r--pimd/pim6_cmd.c35
-rw-r--r--pimd/pim6_cmd.h1
-rw-r--r--pimd/pim_addr.h2
-rw-r--r--pimd/pim_vty.c4
-rw-r--r--zebra/if_netlink.c4
6 files changed, 50 insertions, 4 deletions
diff --git a/doc/user/pimv6.rst b/doc/user/pimv6.rst
index e6585d0bac..851e58b814 100644
--- a/doc/user/pimv6.rst
+++ b/doc/user/pimv6.rst
@@ -445,3 +445,11 @@ the config was written out.
.. clicmd:: debug pimv6 zebra
This gathers data about events from zebra that come up through the ZAPI.
+
+.. clicmd:: debug mroute6
+
+ This turns on debugging for PIMv6 interaction with kernel MFC cache.
+
+.. clicmd:: debug mroute6 detail
+
+ This turns on detailed debugging for PIMv6 interaction with kernel MFC cache.
diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c
index 01c5745426..dc84de6bfd 100644
--- a/pimd/pim6_cmd.c
+++ b/pimd/pim6_cmd.c
@@ -1516,6 +1516,37 @@ DEFPY (debug_pimv6_zebra,
return CMD_SUCCESS;
}
+DEFPY (debug_mroute6,
+ debug_mroute6_cmd,
+ "[no] debug mroute6",
+ NO_STR
+ DEBUG_STR
+ DEBUG_MROUTE6_STR)
+{
+ if (!no)
+ PIM_DO_DEBUG_MROUTE;
+ else
+ PIM_DONT_DEBUG_MROUTE;
+
+ return CMD_SUCCESS;
+}
+
+DEFPY (debug_mroute6_detail,
+ debug_mroute6_detail_cmd,
+ "[no] debug mroute6 detail",
+ NO_STR
+ DEBUG_STR
+ DEBUG_MROUTE6_STR
+ "detailed\n")
+{
+ if (!no)
+ PIM_DO_DEBUG_MROUTE_DETAIL;
+ else
+ PIM_DONT_DEBUG_MROUTE_DETAIL;
+
+ return CMD_SUCCESS;
+}
+
DEFUN_NOSH (show_debugging_pimv6,
show_debugging_pimv6_cmd,
"show debugging [pimv6]",
@@ -1660,6 +1691,8 @@ void pim_cmd_init(void)
install_element(ENABLE_NODE, &debug_pimv6_trace_cmd);
install_element(ENABLE_NODE, &debug_pimv6_trace_detail_cmd);
install_element(ENABLE_NODE, &debug_pimv6_zebra_cmd);
+ install_element(ENABLE_NODE, &debug_mroute6_cmd);
+ install_element(ENABLE_NODE, &debug_mroute6_detail_cmd);
install_element(CONFIG_NODE, &debug_pimv6_cmd);
install_element(CONFIG_NODE, &debug_pimv6_nht_cmd);
@@ -1671,4 +1704,6 @@ void pim_cmd_init(void)
install_element(CONFIG_NODE, &debug_pimv6_trace_cmd);
install_element(CONFIG_NODE, &debug_pimv6_trace_detail_cmd);
install_element(CONFIG_NODE, &debug_pimv6_zebra_cmd);
+ install_element(CONFIG_NODE, &debug_mroute6_cmd);
+ install_element(CONFIG_NODE, &debug_mroute6_detail_cmd);
}
diff --git a/pimd/pim6_cmd.h b/pimd/pim6_cmd.h
index 8fb82d9f26..c45c998453 100644
--- a/pimd/pim6_cmd.h
+++ b/pimd/pim6_cmd.h
@@ -57,6 +57,7 @@
#define DEBUG_PIMV6_PACKETDUMP_RECV_STR "Dump received packets\n"
#define DEBUG_PIMV6_TRACE_STR "PIMv6 internal daemon activity\n"
#define DEBUG_PIMV6_ZEBRA_STR "ZEBRA protocol activity\n"
+#define DEBUG_MROUTE6_STR "PIMv6 interaction with kernel MFC cache\n"
void pim_cmd_init(void);
diff --git a/pimd/pim_addr.h b/pimd/pim_addr.h
index 2f0743b570..2f2ff24675 100644
--- a/pimd/pim_addr.h
+++ b/pimd/pim_addr.h
@@ -36,6 +36,7 @@ typedef struct in_addr pim_addr;
#define PIM_MAX_BITLEN IPV4_MAX_BITLEN
#define PIM_AF_NAME "ip"
#define PIM_AF_DBG "pim"
+#define PIM_MROUTE_DBG "mroute"
#define PIMREG "pimreg"
#define PIM_ADDR_FUNCNAME(name) ipv4_##name
@@ -61,6 +62,7 @@ typedef struct in6_addr pim_addr;
#define PIM_MAX_BITLEN IPV6_MAX_BITLEN
#define PIM_AF_NAME "ipv6"
#define PIM_AF_DBG "pimv6"
+#define PIM_MROUTE_DBG "mroute6"
#define PIMREG "pim6reg"
#define PIM_ADDR_FUNCNAME(name) ipv6_##name
diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c
index f9642b2133..3d5d68b1f4 100644
--- a/pimd/pim_vty.c
+++ b/pimd/pim_vty.c
@@ -78,11 +78,11 @@ int pim_debug_config_write(struct vty *vty)
/* PIM_DEBUG_MROUTE catches _DETAIL too */
if (router->debugs & PIM_MASK_MROUTE) {
- vty_out(vty, "debug mroute\n");
+ vty_out(vty, "debug " PIM_MROUTE_DBG "\n");
++writes;
}
if (PIM_DEBUG_MROUTE_DETAIL) {
- vty_out(vty, "debug mroute detail\n");
+ vty_out(vty, "debug " PIM_MROUTE_DBG " detail\n");
++writes;
}
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c
index 7a4e1304bd..c7e7443a1b 100644
--- a/zebra/if_netlink.c
+++ b/zebra/if_netlink.c
@@ -423,7 +423,7 @@ static uint32_t get_iflink_speed(struct interface *interface, int *error)
ecmd.cmd = ETHTOOL_GSET; /* ETHTOOL_GLINK */
ifdata.ifr_data = (caddr_t)&ecmd;
- /* use ioctl to get IP address of an interface */
+ /* use ioctl to get speed of an interface */
frr_with_privs(&zserv_privs) {
sd = vrf_socket(PF_INET, SOCK_DGRAM, IPPROTO_IP,
interface->vrf->vrf_id, NULL);
@@ -436,7 +436,7 @@ static uint32_t get_iflink_speed(struct interface *interface, int *error)
*error = -1;
return 0;
}
- /* Get the current link state for the interface */
+ /* Get the current link state for the interface */
rc = vrf_ioctl(interface->vrf->vrf_id, sd, SIOCETHTOOL,
(char *)&ifdata);
}