Commit 451ded7c authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't update seqno periodically, rely on explicit requests.

parent f5e9f532
...@@ -272,10 +272,6 @@ main(int argc, char **argv) ...@@ -272,10 +272,6 @@ main(int argc, char **argv)
70000); 70000);
update_interval = MAX(update_interval, 70); update_interval = MAX(update_interval, 70);
if(seqno_interval <= 0)
seqno_interval = MAX(40000, update_interval * 9 / 10);
seqno_interval = MAX(seqno_interval, 20);
if(do_daemonise) { if(do_daemonise) {
if(logfile == NULL) if(logfile == NULL)
logfile = "/var/log/babel.log"; logfile = "/var/log/babel.log";
......
...@@ -48,7 +48,6 @@ int split_horizon = 1; ...@@ -48,7 +48,6 @@ int split_horizon = 1;
unsigned short myseqno = 0; unsigned short myseqno = 0;
struct timeval seqno_time = {0, 0}; struct timeval seqno_time = {0, 0};
int seqno_interval = -1;
#define UNICAST_BUFSIZE 1024 #define UNICAST_BUFSIZE 1024
int unicast_buffered = 0; int unicast_buffered = 0;
...@@ -1053,17 +1052,10 @@ send_wildcard_retraction(struct network *net) ...@@ -1053,17 +1052,10 @@ send_wildcard_retraction(struct network *net)
} }
void void
update_myseqno(int force) update_myseqno()
{ {
int delay = timeval_minus_msec(&now, &seqno_time);
if(delay < 1000)
return;
if(force || delay >= seqno_interval) {
myseqno = seqno_plus(myseqno, 1); myseqno = seqno_plus(myseqno, 1);
seqno_time = now; seqno_time = now;
}
} }
void void
...@@ -1071,8 +1063,6 @@ send_self_update(struct network *net) ...@@ -1071,8 +1063,6 @@ send_self_update(struct network *net)
{ {
int i; int i;
update_myseqno(0);
if(net == NULL) { if(net == NULL) {
struct network *n; struct network *n;
FOR_ALL_NETS(n) { FOR_ALL_NETS(n) {
...@@ -1364,7 +1354,7 @@ handle_request(struct neighbour *neigh, const unsigned char *prefix, ...@@ -1364,7 +1354,7 @@ handle_request(struct neighbour *neigh, const unsigned char *prefix,
/* Hopelessly out-of-date request */ /* Hopelessly out-of-date request */
return; return;
} }
update_myseqno(1); update_myseqno();
} }
} }
send_update(neigh->network, 1, prefix, plen); send_update(neigh->network, 1, prefix, plen);
......
...@@ -40,7 +40,6 @@ THE SOFTWARE. ...@@ -40,7 +40,6 @@ THE SOFTWARE.
extern unsigned short myseqno; extern unsigned short myseqno;
extern struct timeval seqno_time; extern struct timeval seqno_time;
extern int seqno_interval;
extern int parasitic; extern int parasitic;
extern int silent_time; extern int silent_time;
...@@ -66,7 +65,7 @@ void send_update(struct network *net, int urgent, ...@@ -66,7 +65,7 @@ void send_update(struct network *net, int urgent,
void send_update_resend(struct network *net, void send_update_resend(struct network *net,
const unsigned char *prefix, unsigned char plen); const unsigned char *prefix, unsigned char plen);
void send_wildcard_retraction(struct network *net); void send_wildcard_retraction(struct network *net);
void update_myseqno(int force); void update_myseqno(void);
void send_self_update(struct network *net); void send_self_update(struct network *net);
void send_ihu(struct neighbour *neigh, struct network *net); void send_ihu(struct neighbour *neigh, struct network *net);
void send_marginal_ihu(struct network *net); void send_marginal_ihu(struct network *net);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment