summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-04-01 13:54:39 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2011-04-01 13:55:52 +0200
commit4ef0950603ffbd515d97359015585b4a7512bc75 (patch)
treeb896d63763c6657b295713e1c064ba3ed276f3d8 /nest
parentd93a43a57d37b7cc5506a823a081d21f515c3820 (diff)
Fixes a problem with BGP protocols and implicit router IDs.
Diffstat (limited to 'nest')
-rw-r--r--nest/proto.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/nest/proto.c b/nest/proto.c
index d6d5d77b..f04b5a6c 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -31,6 +31,7 @@ list active_proto_list;
static list inactive_proto_list;
static list initial_proto_list;
static list flush_proto_list;
+static struct proto *initial_device_proto;
static event *proto_flush_event;
@@ -248,6 +249,8 @@ protos_postconfig(struct config *c)
DBG("\n");
}
+extern struct protocol proto_unix_iface;
+
static struct proto *
proto_init(struct proto_config *c)
{
@@ -257,6 +260,9 @@ proto_init(struct proto_config *c)
q->proto_state = PS_DOWN;
q->core_state = FS_HUNGRY;
proto_enqueue(&initial_proto_list, q);
+ if (p == &proto_unix_iface)
+ initial_device_proto = q;
+
add_tail(&proto_list, &q->glob_node);
PD(q, "Initializing%s", q->disabled ? " [disabled]" : "");
return q;
@@ -413,6 +419,14 @@ protos_commit(struct config *new, struct config *old, int force_reconfig, int ty
DBG("\tdone\n");
DBG("Protocol start\n");
+
+ /* Start device protocol first */
+ if (initial_device_proto)
+ {
+ proto_rethink_goal(initial_device_proto);
+ initial_device_proto = NULL;
+ }
+
WALK_LIST_DELSAFE(p, n, initial_proto_list)
proto_rethink_goal(p);
}
@@ -741,8 +755,6 @@ proto_notify_state(struct proto *p, unsigned ps)
}
}
-extern struct protocol proto_unix_iface;
-
static void
proto_flush_all(void *unused UNUSED)
{