unsigned long conf_bgp_debug_update;
unsigned long conf_bgp_debug_bestpath;
unsigned long conf_bgp_debug_zebra;
+unsigned long conf_bgp_debug_allow_martians;
unsigned long conf_bgp_debug_nht;
unsigned long conf_bgp_debug_update_groups;
unsigned long term_bgp_debug_update;
unsigned long term_bgp_debug_bestpath;
unsigned long term_bgp_debug_zebra;
+unsigned long term_bgp_debug_allow_martians;
unsigned long term_bgp_debug_nht;
unsigned long term_bgp_debug_update_groups;
return CMD_SUCCESS;
}
+DEFUN (debug_bgp_allow_martians,
+ debug_bgp_allow_martians_cmd,
+ "debug bgp allow-martians",
+ DEBUG_STR
+ BGP_STR
+ "BGP allow martian next hops\n")
+{
+ if (vty->node == CONFIG_NODE)
+ DEBUG_ON (allow_martians, ALLOW_MARTIANS);
+ else
+ {
+ TERM_DEBUG_ON (allow_martians, ALLOW_MARTIANS);
+ vty_out (vty, "BGP allow_martian next hop debugging is on%s", VTY_NEWLINE);
+ }
+ return CMD_SUCCESS;
+}
+
+DEFUN (no_debug_bgp_allow_martians,
+ no_debug_bgp_allow_martians_cmd,
+ "no debug bgp allow-martians",
+ NO_STR
+ DEBUG_STR
+ BGP_STR
+ "BGP allow martian next hops\n")
+{
+ if (vty->node == CONFIG_NODE)
+ DEBUG_OFF (allow_martians, ALLOW_MARTIANS);
+ else
+ {
+ TERM_DEBUG_OFF (allow_martians, ALLOW_MARTIANS);
+ vty_out (vty, "BGP allow martian next hop debugging is off%s", VTY_NEWLINE);
+ }
+ return CMD_SUCCESS;
+}
+
+ALIAS (no_debug_bgp_allow_martians,
+ undebug_bgp_allow_martians_cmd,
+ "undebug bgp allow-martians",
+ UNDEBUG_STR
+ BGP_STR
+ "BGP allow martian next hops\n")
+
/* debug bgp update-groups */
DEFUN (debug_bgp_update_groups,
debug_bgp_update_groups_cmd,
TERM_DEBUG_OFF (as4, AS4_SEGMENT);
TERM_DEBUG_OFF (neighbor_events, NEIGHBOR_EVENTS);
TERM_DEBUG_OFF (zebra, ZEBRA);
+ TERM_DEBUG_OFF (allow_martians, ALLOW_MARTIANS);
vty_out (vty, "All possible debugging has been turned off%s", VTY_NEWLINE);
return CMD_SUCCESS;
bgp_debug_list_print (vty, " BGP zebra debugging is on",
bgp_debug_zebra_prefixes);
+ if (BGP_DEBUG (allow_martians, ALLOW_MARTIANS))
+ vty_out (vty, " BGP allow martian next hop debugging is on%s", VTY_NEWLINE);
vty_out (vty, "%s", VTY_NEWLINE);
return CMD_SUCCESS;
}
}
}
+ if (CONF_BGP_DEBUG (allow_martians, ALLOW_MARTIANS))
+ {
+ vty_out (vty, "debug bgp allow-martians%s", VTY_NEWLINE);
+ write++;
+ }
+
return write;
}
install_element (CONFIG_NODE, &debug_bgp_update_cmd);
install_element (ENABLE_NODE, &debug_bgp_zebra_cmd);
install_element (CONFIG_NODE, &debug_bgp_zebra_cmd);
+ install_element (ENABLE_NODE, &debug_bgp_allow_martians_cmd);
+ install_element (CONFIG_NODE, &debug_bgp_allow_martians_cmd);
install_element (ENABLE_NODE, &debug_bgp_update_groups_cmd);
install_element (CONFIG_NODE, &debug_bgp_update_groups_cmd);
install_element (ENABLE_NODE, &debug_bgp_bestpath_prefix_cmd);
install_element (CONFIG_NODE, &no_debug_bgp_update_cmd);
install_element (ENABLE_NODE, &no_debug_bgp_zebra_cmd);
install_element (CONFIG_NODE, &no_debug_bgp_zebra_cmd);
+ install_element (ENABLE_NODE, &no_debug_bgp_allow_martians_cmd);
+ install_element (ENABLE_NODE, &undebug_bgp_allow_martians_cmd);
+ install_element (CONFIG_NODE, &no_debug_bgp_allow_martians_cmd);
install_element (ENABLE_NODE, &no_debug_bgp_update_groups_cmd);
install_element (CONFIG_NODE, &no_debug_bgp_update_groups_cmd);
install_element (ENABLE_NODE, &no_debug_bgp_cmd);
extern unsigned long conf_bgp_debug_update;
extern unsigned long conf_bgp_debug_bestpath;
extern unsigned long conf_bgp_debug_zebra;
+extern unsigned long conf_bgp_debug_allow_martians;
extern unsigned long conf_bgp_debug_nht;
extern unsigned long conf_bgp_debug_update_groups;
extern unsigned long term_bgp_debug_update;
extern unsigned long term_bgp_debug_bestpath;
extern unsigned long term_bgp_debug_zebra;
+extern unsigned long term_bgp_debug_allow_martians;
extern unsigned long term_bgp_debug_nht;
extern unsigned long term_bgp_debug_update_groups;
#define BGP_DEBUG_UPDATE_OUT 0x02
#define BGP_DEBUG_UPDATE_PREFIX 0x04
#define BGP_DEBUG_ZEBRA 0x01
+#define BGP_DEBUG_ALLOW_MARTIANS 0x01
#define BGP_DEBUG_NHT 0x01
#define BGP_DEBUG_UPDATE_GROUPS 0x01