summaryrefslogtreecommitdiff
path: root/babeld
diff options
context:
space:
mode:
Diffstat (limited to 'babeld')
-rw-r--r--babeld/babel_interface.c7
-rw-r--r--babeld/babel_interface.h2
-rw-r--r--babeld/babel_main.c15
-rw-r--r--babeld/babel_main.h1
-rw-r--r--babeld/babeld.h6
5 files changed, 8 insertions, 23 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 24f56f38..2b5f9569 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -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;
diff --git a/babeld/babel_interface.h b/babeld/babel_interface.h
index 1761e3d9..94fd8e5d 100644
--- a/babeld/babel_interface.h
+++ b/babeld/babel_interface.h
@@ -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)
diff --git a/babeld/babel_main.c b/babeld/babel_main.c
index 3d83091b..0fcba749 100644
--- a/babeld/babel_main.c
+++ b/babeld/babel_main.c
@@ -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. */
diff --git a/babeld/babel_main.h b/babeld/babel_main.h
index 4c08e181..a4038dec 100644
--- a/babeld/babel_main.h
+++ b/babeld/babel_main.h
@@ -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];
diff --git a/babeld/babeld.h b/babeld/babeld.h
index 3c473230..b19ae0f2 100644
--- a/babeld/babeld.h
+++ b/babeld/babeld.h
@@ -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. */