Commit 70470e41 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Redistribute local addresses by default.

parent c655714c
......@@ -231,6 +231,12 @@ main(int argc, char **argv)
}
}
rc = finalise_filters();
if(rc < 0) {
fprintf(stderr, "Couldn't finalise filters.\n");
exit(1);
}
if(wireless_hello_interval <= 0)
wireless_hello_interval = 6;
......
......@@ -475,3 +475,17 @@ redistribute_filter(const unsigned char *prefix, unsigned short plen,
res = INFINITY;
return res;
}
int
finalise_filters()
{
struct filter *filter = calloc(1, sizeof(struct filter));
if(filter == NULL)
return -1;
filter->proto = RTPROT_BABEL_LOCAL;
filter->plen_le = 128;
add_filter(filter, &redistribute_filters);
return 1;
}
......@@ -47,3 +47,4 @@ int output_filter(const unsigned char *id, const unsigned char *prefix,
unsigned short plen, unsigned int ifindex);
int redistribute_filter(const unsigned char *prefix, unsigned short plen,
unsigned int ifindex, int proto);
int finalise_filters(void);
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