diff options
| author | ßingen <bingen@voltanet.io> | 2017-05-15 17:09:28 +0200 | 
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-08-09 12:35:15 +0200 | 
| commit | 6833ae01bc8cb0c15579d7098f2d525a6e36c8bb (patch) | |
| tree | f9495c40c9edc6fb7f68bf91a07e56eab003db6e /zebra/debug.c | |
| parent | 2f9c59f031a76db29235cf17dc6b1e62c39370ac (diff) | |
zebra: add pseudowire manager
Base framework for supporting MPLS pseudowires in FRR.
A consistent zserv interface is provided so that any client daemon
(e.g. ldpd, bgpd) can install/uninstall pseudowires in a standard
way. Static pseudowires can also be implemented by using the same
interface.
When zebra receives a request to install a pseudowire and the installation
in the kernel or hardware fails, a notification is sent back to the
client daemon and a new install attempt is made every 60 seconds (until
it succeeds).
Support for external dataplanes is provided by the use of hooks to
install/uninstall pseudowires.
Signed-off-by: ßingen <bingen@voltanet.io>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/debug.c')
| -rw-r--r-- | zebra/debug.c | 25 | 
1 files changed, 25 insertions, 0 deletions
diff --git a/zebra/debug.c b/zebra/debug.c index 6aedea1e39..6728ed1325 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -32,6 +32,7 @@ unsigned long zebra_debug_fpm;  unsigned long zebra_debug_nht;  unsigned long zebra_debug_mpls;  unsigned long zebra_debug_vxlan; +unsigned long zebra_debug_pw;  DEFUN (show_debugging_zebra,         show_debugging_zebra_cmd, @@ -82,6 +83,8 @@ DEFUN (show_debugging_zebra,  		vty_out(vty, "  Zebra next-hop tracking debugging is on\n");  	if (IS_ZEBRA_DEBUG_MPLS)  		vty_out(vty, "  Zebra MPLS debugging is on\n"); +	if (IS_ZEBRA_DEBUG_PW) +		vty_out(vty, "  Zebra pseudowire debugging is on\n");  	return CMD_SUCCESS;  } @@ -130,6 +133,21 @@ DEFUN (debug_zebra_vxlan,  	return CMD_WARNING;  } +DEFUN (debug_zebra_pw, +       debug_zebra_pw_cmd, +       "[no] debug zebra pseudowires", +       "Negate a command or set its defaults\n" +       DEBUG_STR +       "Zebra configuration\n" +       "Debug option set for zebra pseudowires\n") +{ +	if (strmatch(argv[0]->text, "no")) +		UNSET_FLAG(zebra_debug_pw, ZEBRA_DEBUG_PW); +	else +		SET_FLAG(zebra_debug_pw, ZEBRA_DEBUG_PW); +	return CMD_WARNING; +} +  DEFUN (debug_zebra_packet,         debug_zebra_packet_cmd,         "debug zebra packet [<recv|send>] [detail]", @@ -419,6 +437,10 @@ static int config_write_debug(struct vty *vty)  		vty_out(vty, "debug zebra vxlan\n");  		write++;  	} +	if (IS_ZEBRA_DEBUG_PW) { +		vty_out(vty, "debug zebra pseudowires%s", VTY_NEWLINE); +		write++; +	}  	return write;  } @@ -431,6 +453,7 @@ void zebra_debug_init(void)  	zebra_debug_fpm = 0;  	zebra_debug_mpls = 0;  	zebra_debug_vxlan = 0; +	zebra_debug_pw = 0;  	install_node(&debug_node, config_write_debug); @@ -440,6 +463,7 @@ void zebra_debug_init(void)  	install_element(ENABLE_NODE, &debug_zebra_nht_cmd);  	install_element(ENABLE_NODE, &debug_zebra_mpls_cmd);  	install_element(ENABLE_NODE, &debug_zebra_vxlan_cmd); +	install_element(ENABLE_NODE, &debug_zebra_pw_cmd);  	install_element(ENABLE_NODE, &debug_zebra_packet_cmd);  	install_element(ENABLE_NODE, &debug_zebra_kernel_cmd);  	install_element(ENABLE_NODE, &debug_zebra_kernel_msgdump_cmd); @@ -459,6 +483,7 @@ void zebra_debug_init(void)  	install_element(CONFIG_NODE, &debug_zebra_nht_cmd);  	install_element(CONFIG_NODE, &debug_zebra_mpls_cmd);  	install_element(CONFIG_NODE, &debug_zebra_vxlan_cmd); +	install_element(CONFIG_NODE, &debug_zebra_pw_cmd);  	install_element(CONFIG_NODE, &debug_zebra_packet_cmd);  	install_element(CONFIG_NODE, &debug_zebra_kernel_cmd);  	install_element(CONFIG_NODE, &debug_zebra_kernel_msgdump_cmd);  | 
