Commit bda8e6d1 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Dump interfaces too.

parent 0870ecba
...@@ -230,10 +230,22 @@ local_notify_route(struct babel_route *route, int kind) ...@@ -230,10 +230,22 @@ local_notify_route(struct babel_route *route, int kind)
static void static void
local_notify_all_1(struct local_socket *s) local_notify_all_1(struct local_socket *s)
{ {
struct interface *ifp;
struct neighbour *neigh; struct neighbour *neigh;
struct xroute_stream *xroutes; struct xroute_stream *xroutes;
struct route_stream *routes; struct route_stream *routes;
FOR_ALL_INTERFACES(ifp) {
char buf[512];
int rc;
rc = snprintf(buf, 512, "add interface %s\n", ifp->name);
if(rc < 0 || rc >= 512)
goto fail;
rc = write_timeout(s->fd, buf, rc);
if(rc < 0)
goto fail;
}
FOR_ALL_NEIGHBOURS(neigh) { FOR_ALL_NEIGHBOURS(neigh) {
local_notify_neighbour_1(s, neigh, LOCAL_ADD); local_notify_neighbour_1(s, neigh, LOCAL_ADD);
} }
...@@ -260,6 +272,10 @@ local_notify_all_1(struct local_socket *s) ...@@ -260,6 +272,10 @@ local_notify_all_1(struct local_socket *s)
route_stream_done(routes); route_stream_done(routes);
} }
return; return;
fail:
shutdown(s->fd, 1);
return;
} }
int 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