Commit 03dcac30 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Remove "parasitic" mode.

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, 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.
parent 4ae54663
......@@ -167,9 +167,6 @@ main(int argc, char **argv)
if(allow_duplicates < 0 || allow_duplicates > 0xFFFF)
goto usage;
break;
case 'P':
parasitic = 1;
break;
case 's':
split_horizon = 0;
break;
......@@ -273,12 +270,6 @@ main(int argc, char **argv)
resend_delay = MIN(resend_delay, default_wired_hello_interval / 2);
resend_delay = MAX(resend_delay, 20);
if(parasitic && allow_duplicates >= 0) {
/* Too difficult to get right. */
fprintf(stderr, "Sorry, -P and -A are incompatible.\n");
exit(1);
}
if(do_daemonise) {
if(logfile == NULL)
logfile = "/var/log/babeld.log";
......@@ -780,7 +771,7 @@ main(int argc, char **argv)
" "
"[-h hello] [-H wired_hello] [-z kind[,factor]]\n"
" "
"[-k metric] [-A metric] [-s] [-P] [-l] [-w] [-u] [-g port]\n"
"[-k metric] [-A metric] [-s] [-l] [-w] [-u] [-g port]\n"
" "
"[-t table] [-T table] [-c file] [-C statement]\n"
" "
......
......@@ -88,10 +88,6 @@ Do not flush unfeasible (useless) routes. This is useful in order to
announce more information to a front-end (see
.BR \-g ).
.TP
.B \-P
Run in parasitic (passive) mode. The daemon will only announce
redistributed routes.
.TP
.BI \-d " level"
Debug level. A value of 1 requests a routing table dump at every
iteration through the daemon's main loop. A value of 2 additionally
......
......@@ -43,7 +43,6 @@ THE SOFTWARE.
unsigned char packet_header[4] = {42, 2};
int parasitic = 0;
int split_horizon = 1;
unsigned short myseqno = 0;
......@@ -1120,17 +1119,13 @@ send_update(struct interface *ifp, int urgent,
return;
if(prefix) {
if(!parasitic || find_xroute(prefix, plen)) {
debugf("Sending update to %s for %s.\n",
ifp->name, format_prefix(prefix, plen));
buffer_update(ifp, prefix, plen);
}
} else {
send_self_update(ifp);
if(!parasitic) {
debugf("Sending update to %s for any.\n", ifp->name);
for_all_installed_routes(buffer_update_callback, ifp);
}
set_timeout(&ifp->update_timeout, ifp->update_interval);
ifp->last_update_time = now.tv_sec;
}
......
......@@ -41,7 +41,6 @@ THE SOFTWARE.
extern unsigned short myseqno;
extern struct timeval seqno_time;
extern int parasitic;
extern int broadcast_ihu;
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