]> git.puffer.fish Git - matthieu/frr.git/commitdiff
babeld: remove "parasitic" mode.
authorJuliusz Chroboczek <jch@pps.jussieu.fr>
Tue, 14 Feb 2012 14:43:34 +0000 (15:43 +0100)
committerPaul Jakma <paul@quagga.net>
Sun, 25 Mar 2012 16:06:54 +0000 (17:06 +0100)
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.

babeld/babel_interface.c
babeld/babel_main.c
babeld/message.c
babeld/message.h
doc/babeld.texi

index 958b1b984f7c6ed8fcc837ecd414e960307c7949..ace28127ff43ce6692c28c84f9b69aa08861bbe6 100644 (file)
@@ -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);
index 003d746b0f5e695e4b768bdbf1a2e45d1e271444..2f3b5552e5df4451c96a931a4422c4210f25780e 100644 (file)
@@ -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);
 }
index e86b4325bb4d76fdffc70b2b51981be753786bf7..9dcfc6771c63efa444951405fa0339979677eda0 100644 (file)
@@ -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;
     }
index 1626a887a43070bb9bab765ba124fa7d77ab5a99..6a9aa10466f0015b66677b638668c7c34ed7c2fd 100644 (file)
@@ -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;
 
index 65587a71766acbac86c336e313e4cdb06751948e..1f24edd062748db606c115bc41bb9c94b7813414 100644 (file)
@@ -66,14 +66,6 @@ correct, while @code{babel split-horizon} is an optimisation that
 should only be used on symmetric and transitive (wired) networks.
 @end deffn
 
-@deffn {Interface Command} {babel passive-interface}
-@deffnx {Interface Command} {no babel passive-interface}
-Specifies whether this interface is passive.  Note that this is
-a little weaker than RIP's notion of passive interface, since Babel
-always sends Hello packets and announces redistributed routes, even on
-passive interfaces.
-@end deffn
-
 @deffn {Interface Command} {babel hello-interval <20-655340>}
 Specifies the time in milliseconds between two scheduled hellos.  On
 wired links, Babel notices a link failure within two hello intervals;