diff options
author | Juliusz Chroboczek <jch@pps.jussieu.fr> | 2012-02-14 15:43:34 +0100 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2012-03-25 17:06:54 +0100 |
commit | 6881f2698279f3c47a55e8969860eeac59e8c3d7 (patch) | |
tree | 7408dfdeff638ce16273cd7c8c4d9c35a99cfe87 /babeld | |
parent | cbde15513ba47f6e7f6d02fcafcfb12cd5b1df77 (diff) |
babeld: remove "parasitic" mode.
This is the functionality described in Appendix C of RFC 6126. Its
main purpose is to avoid keeping a full source table, which makes it
possible to implement a subset of Babel in just a few hundred lines of
code. However, in Quagga the code for maintaining the source table is
already there, and a parasitic implementation can be simulated using
filtering -- so it makes little sense to keep the functionality.
Diffstat (limited to 'babeld')
-rw-r--r-- | babeld/babel_interface.c | 28 | ||||
-rw-r--r-- | babeld/babel_main.c | 8 | ||||
-rw-r--r-- | babeld/message.c | 16 | ||||
-rw-r--r-- | babeld/message.h | 1 |
4 files changed, 5 insertions, 48 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c index 958b1b98..ace28127 100644 --- a/babeld/babel_interface.c +++ b/babeld/babel_interface.c @@ -479,32 +479,6 @@ DEFUN (babel_set_update_interval, return CMD_SUCCESS; } -/* [Interface Command]. */ -DEFUN (babel_passive_interface, - babel_passive_interface_cmd, - "babel passive-interface", - "Babel interface commands\n" - "Only announce redistributed routes on this interface\n") -{ - if (allow_duplicates) { - return CMD_WARNING; - } - parasitic = 1; - return CMD_SUCCESS; -} - -/* [Interface Command]. */ -DEFUN (no_babel_passive_interface, - no_babel_passive_interface_cmd, - "no babel passive-interface", - NO_STR - "Babel interface commands\n" - "Announce all routes on this interface\n") -{ - parasitic = 0; - return CMD_SUCCESS; -} - /* This should be no more than half the hello interval, so that hellos aren't sent late. The result is in milliseconds. */ unsigned @@ -926,8 +900,6 @@ babel_if_init () install_element(INTERFACE_NODE, &babel_set_wireless_cmd); install_element(INTERFACE_NODE, &babel_set_hello_interval_cmd); install_element(INTERFACE_NODE, &babel_set_update_interval_cmd); - install_element(INTERFACE_NODE, &babel_passive_interface_cmd); - install_element(INTERFACE_NODE, &no_babel_passive_interface_cmd); /* "show babel ..." commands */ install_element(VIEW_NODE, &show_babel_interface_cmd); diff --git a/babeld/babel_main.c b/babeld/babel_main.c index 003d746b..2f3b5552 100644 --- a/babeld/babel_main.c +++ b/babeld/babel_main.c @@ -258,12 +258,6 @@ babel_init(int argc, char **argv) resend_delay = BABEL_DEFAULT_RESEND_DELAY; - if(parasitic && allow_duplicates >= 0) { - /* Too difficult to get right. */ - zlog_err("Sorry, -P and -A are incompatible."); - exit(1); - } - babel_replace_by_null(STDIN_FILENO); if (do_daemonise && daemonise() < 0) { @@ -520,7 +514,6 @@ show_babel_main_configuration (struct vty *vty) "vty address = %s%s" "vty port = %d%s" "id = %s%s" - "parasitic = %s%s" "allow_duplicates = %s%s" "kernel_metric = %d%s", pidfile, VTY_NEWLINE, @@ -534,7 +527,6 @@ show_babel_main_configuration (struct vty *vty) VTY_NEWLINE, babel_vty_port, VTY_NEWLINE, format_eui64(myid), VTY_NEWLINE, - format_bool(parasitic), VTY_NEWLINE, format_bool(allow_duplicates), VTY_NEWLINE, kernel_metric, VTY_NEWLINE); } diff --git a/babeld/message.c b/babeld/message.c index e86b4325..9dcfc677 100644 --- a/babeld/message.c +++ b/babeld/message.c @@ -54,7 +54,6 @@ THE SOFTWARE. unsigned char packet_header[4] = {42, 2}; -int parasitic = 0; int split_horizon = 1; unsigned short myseqno = 0; @@ -1153,18 +1152,13 @@ send_update(struct interface *ifp, int urgent, babel_ifp = babel_get_if_nfo(ifp); if(prefix) { - if(!parasitic || find_xroute(prefix, plen)) { - debugf(BABEL_DEBUG_COMMON,"Sending update to %s for %s.", - ifp->name, format_prefix(prefix, plen)); - buffer_update(ifp, prefix, plen); - } + debugf(BABEL_DEBUG_COMMON,"Sending update to %s for %s.", + ifp->name, format_prefix(prefix, plen)); + buffer_update(ifp, prefix, plen); } else { send_self_update(ifp); - if(!parasitic) { - debugf(BABEL_DEBUG_COMMON,"Sending update to %s for any.", - ifp->name); - for_all_installed_routes(buffer_update_callback, ifp); - } + debugf(BABEL_DEBUG_COMMON,"Sending update to %s for any.", ifp->name); + for_all_installed_routes(buffer_update_callback, ifp); set_timeout(&babel_ifp->update_timeout, babel_ifp->update_interval); babel_ifp->last_update_time = babel_now.tv_sec; } diff --git a/babeld/message.h b/babeld/message.h index 1626a887..6a9aa104 100644 --- a/babeld/message.h +++ b/babeld/message.h @@ -62,7 +62,6 @@ THE SOFTWARE. extern unsigned short myseqno; extern struct timeval seqno_time; -extern int parasitic; extern int broadcast_ihu; extern int split_horizon; |