Commit 3a4fbbf0 by Juliusz Chroboczek

Apply filters to local addresses too.

1 parent d5902f09
Showing 1 changed file with 2 additions and 6 deletions
......@@ -339,7 +339,7 @@ check_xroutes(int send_updates)
int i, j, change = 0, rc;
struct kernel_route *routes;
struct filter_result filter_result;
int numroutes, numaddresses;
int numroutes;
static int maxroutes = 8;
const int maxmaxroutes = 256 * 1024;
......@@ -361,8 +361,6 @@ check_xroutes(int send_updates)
if(numroutes >= maxroutes)
goto resize;
numaddresses = numroutes;
rc = kernel_routes(routes + numroutes, maxroutes - numroutes);
if(rc < 0)
fprintf(stderr, "Couldn't get kernel routes.\n");
......@@ -372,9 +370,7 @@ check_xroutes(int send_updates)
if(numroutes >= maxroutes)
goto resize;
/* Apply filter to kernel routes (e.g. change the source prefix). */
for(i = numaddresses; i < numroutes; i++) {
for(i = 0; i < numroutes; i++) {
routes[i].metric = redistribute_filter(routes[i].prefix, routes[i].plen,
routes[i].src_prefix,
routes[i].src_plen,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!