Commit edd32508 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't obey a silent time.

It is seldom useful, and somewhat inconvenient.
parent bf93867f
...@@ -465,10 +465,6 @@ main(int argc, char **argv) ...@@ -465,10 +465,6 @@ main(int argc, char **argv)
fd = -1; fd = -1;
} }
if(reboot_time + silent_time > now.tv_sec)
fprintf(stderr, "Respecting %ld second silent time.\n",
(long int)(reboot_time + silent_time - now.tv_sec));
protocol_socket = babel_socket(protocol_port); protocol_socket = babel_socket(protocol_port);
if(protocol_socket < 0) { if(protocol_socket < 0) {
perror("Couldn't create link local socket"); perror("Couldn't create link local socket");
......
...@@ -43,7 +43,6 @@ THE SOFTWARE. ...@@ -43,7 +43,6 @@ THE SOFTWARE.
unsigned char packet_header[4] = {42, 2}; unsigned char packet_header[4] = {42, 2};
int parasitic = 0; int parasitic = 0;
int silent_time = 30;
int split_horizon = 1; int split_horizon = 1;
unsigned short myseqno = 0; unsigned short myseqno = 0;
...@@ -967,7 +966,7 @@ void ...@@ -967,7 +966,7 @@ void
send_update(struct network *net, int urgent, send_update(struct network *net, int urgent,
const unsigned char *prefix, unsigned char plen) const unsigned char *prefix, unsigned char plen)
{ {
int i, selfonly; int i;
if(net == NULL) { if(net == NULL) {
struct network *n; struct network *n;
...@@ -988,21 +987,15 @@ send_update(struct network *net, int urgent, ...@@ -988,21 +987,15 @@ send_update(struct network *net, int urgent,
if(!net_up(net)) if(!net_up(net))
return; return;
selfonly =
parasitic || (silent_time && now.tv_sec < reboot_time + silent_time);
if(!selfonly)
silent_time = 0;
if(prefix) { if(prefix) {
if(!selfonly || find_xroute(prefix, plen)) { if(!parasitic || find_xroute(prefix, plen)) {
debugf("Sending update to %s for %s.\n", debugf("Sending update to %s for %s.\n",
net->ifname, format_prefix(prefix, plen)); net->ifname, format_prefix(prefix, plen));
buffer_update(net, prefix, plen); buffer_update(net, prefix, plen);
} }
} else { } else {
send_self_update(net); send_self_update(net);
if(!selfonly && !network_idle(net)) { if(!parasitic && !network_idle(net)) {
debugf("Sending update to %s for any.\n", net->ifname); debugf("Sending update to %s for any.\n", net->ifname);
for(i = 0; i < numroutes; i++) for(i = 0; i < numroutes; i++)
if(routes[i].installed) if(routes[i].installed)
......
...@@ -42,7 +42,6 @@ extern unsigned short myseqno; ...@@ -42,7 +42,6 @@ extern unsigned short myseqno;
extern struct timeval seqno_time; extern struct timeval seqno_time;
extern int parasitic; extern int parasitic;
extern int silent_time;
extern int broadcast_ihu; extern int broadcast_ihu;
extern int split_horizon; extern int split_horizon;
......
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