]> git.puffer.fish Git - matthieu/frr.git/commitdiff
babeld: remove remains of standalone babeld's configuration code.
authorJuliusz Chroboczek <jch@pps.jussieu.fr>
Tue, 14 Feb 2012 07:49:57 +0000 (08:49 +0100)
committerPaul Jakma <paul@quagga.net>
Sun, 25 Mar 2012 16:06:54 +0000 (17:06 +0100)
Standalone babeld has a configuration interface that is not used in
Quagga.  This removes a few bits of this code that survived the
port to Quagga.

babeld/babel_interface.c
babeld/babel_interface.h
babeld/babel_main.c
babeld/babel_main.h
babeld/babeld.h

index 24f56f38f1e48446db6a08fe6ae198ad1a70866c..2b5f9569bc0b9a7fbb4778545f5c83576425c10b 100644 (file)
@@ -565,10 +565,6 @@ interface_recalculate(struct interface *ifp)
         babel_ifp->flags |= BABEL_IF_LQ;
     }
 
-    /* Since the interface was marked as active above, the
-     idle_hello_interval cannot be the one being used here. */
-    babel_ifp->update_interval = babel_ifp->hello_interval * 4;
-
     memset(&mreq, 0, sizeof(mreq));
     memcpy(&mreq.ipv6mr_multiaddr, protocol_group, 16);
     mreq.ipv6mr_interface = ifp->ifindex;
@@ -1019,7 +1015,8 @@ babel_interface_allocate (void)
     babel_ifp->bucket_time = babel_now.tv_sec;
     babel_ifp->bucket = BUCKET_TOKENS_MAX;
     babel_ifp->hello_seqno = (random() & 0xFFFF);
-    babel_ifp->hello_interval = BABELD_DEFAULT_HELLO_INTERVAL;
+    babel_ifp->hello_interval = BABEL_DEFAULT_HELLO_INTERVAL;
+    babel_ifp->update_interval = BABEL_DEFAULT_UPDATE_INTERVAL;
     babel_ifp->channel = BABEL_IF_CHANNEL_INTERFERING;
 
     return babel_ifp;
index 1761e3d905b740e05b9bbe02166a4d67a519ed7e..94fd8e5d756602c929e4039222742c6bb39bb086 100644 (file)
@@ -91,8 +91,6 @@ static inline babel_interface_nfo* babel_get_if_nfo(struct interface *ifp)
     return ((babel_interface_nfo*) ifp->info);
 }
 
-#define IF_CONF(_ifp, _field) babel_get_if_nfo(_ifp)->_field
-
 /* babel_interface_nfo flags */
 #define BABEL_IF_IS_UP         (1 << 0)
 #define BABEL_IF_WIRED         (1 << 1)
index 3d83091bf2bff075ee504c3a3ea6a1dac6026437..0fcba749d03a194007f90b52e1d97865ba80f0c2 100644 (file)
@@ -79,8 +79,6 @@ struct timeval babel_now;         /* current time             */
 unsigned char myid[8];            /* unique id (mac address of an interface) */
 int debug = 0;
 
-int default_wireless_hello_interval = -1;
-int default_wired_hello_interval = -1;
 int resend_delay = -1;
 static const char *pidfile = PATH_BABELD_PID;
 
@@ -258,18 +256,7 @@ babel_init(int argc, char **argv)
     vty_init (master);
     memory_init ();
 
-    if(default_wireless_hello_interval <= 0)
-        default_wireless_hello_interval = 4000;
-    default_wireless_hello_interval = MAX(default_wireless_hello_interval, 5);
-
-    if(default_wired_hello_interval <= 0)
-        default_wired_hello_interval = 4000;
-    default_wired_hello_interval = MAX(default_wired_hello_interval, 5);
-
-    resend_delay = 2000;
-    resend_delay = MIN(resend_delay, default_wireless_hello_interval / 2);
-    resend_delay = MIN(resend_delay, default_wired_hello_interval / 2);
-    resend_delay = MAX(resend_delay, 20);
+    resend_delay = BABEL_DEFAULT_RESEND_DELAY;
 
     if(parasitic && allow_duplicates >= 0) {
         /* Too difficult to get right. */
index 4c08e181893a4c7d745e59639bdf77544be1c9f5..a4038decb3c64cfa32481cc3bc56b39de3212169 100644 (file)
@@ -41,7 +41,6 @@ THE SOFTWARE.
 extern struct timeval babel_now;         /* current time             */
 extern struct thread_master *master;     /* quagga's threads handler */
 extern int debug;
-extern int default_wireless_hello_interval, default_wired_hello_interval;
 extern int resend_delay;
 
 extern unsigned char myid[8];
index 3c4732309c0bde5a82401abfe92456b69a67f4a7..b19ae0f2db180ccd877b3a5bb449e6b66a82e221 100644 (file)
@@ -107,7 +107,11 @@ THE SOFTWARE.
 #define BABEL_VTY_PORT 2609
 #define BABEL_DEFAULT_CONFIG "babeld.conf"
 #define BABEL_VERSION "0.1 for quagga"
-#define BABELD_DEFAULT_HELLO_INTERVAL 4000 /* miliseconds */
+
+/* Values in milliseconds */
+#define BABEL_DEFAULT_HELLO_INTERVAL 4000
+#define BABEL_DEFAULT_UPDATE_INTERVAL 16000
+#define BABEL_DEFAULT_RESEND_DELAY 2000
 
 
 /* Babel socket. */