Commit 28e0d58f authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Local notification for routes.

parent d13920e3
......@@ -37,6 +37,7 @@ THE SOFTWARE.
#include "message.h"
#include "resend.h"
#include "filter.h"
#include "local.h"
struct route *routes = NULL;
int numroutes = 0, maxroutes = 0;
......@@ -86,6 +87,8 @@ flush_route(struct route *route)
lost = 1;
}
local_notify_route(route, 1);
src = route->src;
if(n != numroutes - 1)
......@@ -155,6 +158,7 @@ install_route(struct route *route)
return;
}
route->installed = 1;
local_notify_route(route, 0);
}
void
......@@ -173,6 +177,7 @@ uninstall_route(struct route *route)
perror("kernel_route(FLUSH)");
route->installed = 0;
local_notify_route(route, 0);
}
/* This is equivalent to uninstall_route followed with install_route,
......@@ -201,6 +206,8 @@ switch_routes(struct route *old, struct route *new)
old->installed = 0;
new->installed = 1;
}
local_notify_route(old, 0);
local_notify_route(new, 0);
}
void
......@@ -226,6 +233,7 @@ change_route_metric(struct route *route, int newmetric)
}
}
route->metric = newmetric;
local_notify_route(route, 0);
}
int
......
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