Commit 0111f5c1 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Remove keep_unfeasible, in compliance with rfc6126bis.

parent dd47d361
...@@ -172,7 +172,7 @@ main(int argc, char **argv) ...@@ -172,7 +172,7 @@ main(int argc, char **argv)
while(1) { while(1) {
opt = getopt(argc, argv, opt = getopt(argc, argv,
"m:p:h:H:i:k:A:sruS:d:g:G:lwz:M:t:T:c:C:DL:I:V"); "m:p:h:H:i:k:A:srS:d:g:G:lwz:M:t:T:c:C:DL:I:V");
if(opt < 0) if(opt < 0)
break; break;
...@@ -225,9 +225,6 @@ main(int argc, char **argv) ...@@ -225,9 +225,6 @@ main(int argc, char **argv)
case 'r': case 'r':
random_id = 1; random_id = 1;
break; break;
case 'u':
keep_unfeasible = 1;
break;
case 'S': case 'S':
state_file = optarg; state_file = optarg;
break; break;
......
...@@ -196,11 +196,6 @@ at least ...@@ -196,11 +196,6 @@ at least
Do not use this option unless you know what you are doing, as it can Do not use this option unless you know what you are doing, as it can
cause persistent route flapping. cause persistent route flapping.
.TP .TP
.BR keep-unfeasible " {" true | false }
This specifies whether to keep unfeasible (useless) routes, and is
equivalent to the command-line option
.BR \-u .
.TP
.BR random-id " {" true | false } .BR random-id " {" true | false }
This specifies whether to use a random router-id, and is This specifies whether to use a random router-id, and is
equivalent to the command-line option equivalent to the command-line option
......
...@@ -755,8 +755,7 @@ parse_option(int c, gnc_t gnc, void *closure, char *token) ...@@ -755,8 +755,7 @@ parse_option(int c, gnc_t gnc, void *closure, char *token)
because they require no special setup or because there is special because they require no special setup or because there is special
case code for them. */ case code for them. */
if(config_finalised) { if(config_finalised) {
if(strcmp(token, "keep-unfeasible") != 0 && if(strcmp(token, "link-detect") != 0 &&
strcmp(token, "link-detect") != 0 &&
strcmp(token, "log-file") != 0 && strcmp(token, "log-file") != 0 &&
strcmp(token, "diversity") != 0 && strcmp(token, "diversity") != 0 &&
strcmp(token, "diversity-factor") != 0 && strcmp(token, "diversity-factor") != 0 &&
...@@ -798,8 +797,7 @@ parse_option(int c, gnc_t gnc, void *closure, char *token) ...@@ -798,8 +797,7 @@ parse_option(int c, gnc_t gnc, void *closure, char *token)
add_import_table(v); add_import_table(v);
else else
abort(); abort();
} else if(strcmp(token, "keep-unfeasible") == 0 || } else if(strcmp(token, "link-detect") == 0 ||
strcmp(token, "link-detect") == 0 ||
strcmp(token, "random-id") == 0 || strcmp(token, "random-id") == 0 ||
strcmp(token, "daemonise") == 0 || strcmp(token, "daemonise") == 0 ||
strcmp(token, "skip-kernel-setup") == 0 || strcmp(token, "skip-kernel-setup") == 0 ||
...@@ -810,9 +808,7 @@ parse_option(int c, gnc_t gnc, void *closure, char *token) ...@@ -810,9 +808,7 @@ parse_option(int c, gnc_t gnc, void *closure, char *token)
if(c < -1) if(c < -1)
goto error; goto error;
b = (b == CONFIG_YES); b = (b == CONFIG_YES);
if(strcmp(token, "keep-unfeasible") == 0) if(strcmp(token, "link-detect") == 0)
keep_unfeasible = b;
else if(strcmp(token, "link-detect") == 0)
link_detect = b; link_detect = b;
else if(strcmp(token, "random-id") == 0) else if(strcmp(token, "random-id") == 0)
random_id = b; random_id = b;
......
...@@ -47,7 +47,6 @@ int kernel_metric = 0, reflect_kernel_metric = 0; ...@@ -47,7 +47,6 @@ int kernel_metric = 0, reflect_kernel_metric = 0;
int allow_duplicates = -1; int allow_duplicates = -1;
int diversity_kind = DIVERSITY_NONE; int diversity_kind = DIVERSITY_NONE;
int diversity_factor = 256; /* in units of 1/256 */ int diversity_factor = 256; /* in units of 1/256 */
int keep_unfeasible = 0;
static int smoothing_half_life = 0; static int smoothing_half_life = 0;
static int two_to_the_one_over_hl = 0; /* 2^(1/hl) * 0x10000 */ static int two_to_the_one_over_hl = 0; /* 2^(1/hl) * 0x10000 */
...@@ -906,7 +905,7 @@ update_route(const unsigned char *id, ...@@ -906,7 +905,7 @@ update_route(const unsigned char *id,
} }
route->src = retain_source(src); route->src = retain_source(src);
if((feasible || keep_unfeasible) && refmetric < INFINITY) if(refmetric < INFINITY)
route->time = now.tv_sec; route->time = now.tv_sec;
route->seqno = seqno; route->seqno = seqno;
...@@ -950,8 +949,6 @@ update_route(const unsigned char *id, ...@@ -950,8 +949,6 @@ update_route(const unsigned char *id,
return NULL; return NULL;
if(!feasible) { if(!feasible) {
send_unfeasible_request(neigh, 0, seqno, metric, src); send_unfeasible_request(neigh, 0, seqno, metric, src);
if(!keep_unfeasible)
return NULL;
} }
route = calloc(1, sizeof(struct babel_route)); route = calloc(1, sizeof(struct babel_route));
......
...@@ -51,7 +51,6 @@ struct route_stream; ...@@ -51,7 +51,6 @@ struct route_stream;
extern struct babel_route **routes; extern struct babel_route **routes;
extern int kernel_metric, allow_duplicates, reflect_kernel_metric; extern int kernel_metric, allow_duplicates, reflect_kernel_metric;
extern int diversity_kind, diversity_factor; extern int diversity_kind, diversity_factor;
extern int keep_unfeasible;
static inline int static inline int
route_metric(const struct babel_route *route) route_metric(const struct babel_route *route)
......
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