summaryrefslogtreecommitdiff
path: root/ospf6d
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ChangeLog5
-rw-r--r--ospf6d/ospf6_zebra.c20
2 files changed, 25 insertions, 0 deletions
diff --git a/ospf6d/ChangeLog b/ospf6d/ChangeLog
index a37c4ac1..7778c58a 100644
--- a/ospf6d/ChangeLog
+++ b/ospf6d/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-03 Hasso Tepper <hasso at quagga.net>
+
+ * ospf6_zebra.c: Use router id from zebra daemon if it wasn't set in
+ configuration.
+
2004-09-25 Hasso Tepper <hasso at estpak.ee>
* ospf6_asbr.c, ospf6_lsa.c, ospf6_proto.c, ospf6_proto.h: Fix
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index dd89d8db..0baaaea9 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -44,6 +44,25 @@ unsigned char conf_debug_ospf6_zebra = 0;
/* information about zebra. */
struct zclient *zclient = NULL;
+struct in_addr router_id_zebra;
+
+/* Router-id update message from zebra. */
+int
+ospf6_router_id_update_zebra (int command, struct zclient *zclient,
+ zebra_size_t length)
+{
+ struct prefix router_id;
+ struct ospf6 *o = ospf6;
+
+ zebra_router_id_update_read(zclient->ibuf,&router_id);
+ router_id_zebra = router_id.u.prefix4;
+
+ if (o->router_id == 0)
+ o->router_id = (u_int32_t) router_id_zebra.s_addr;
+
+ return 0;
+}
+
/* redistribute function */
void
ospf6_zebra_redistribute (int type)
@@ -535,6 +554,7 @@ ospf6_zebra_init ()
/* Allocate zebra structure. */
zclient = zclient_new ();
zclient_init (zclient, ZEBRA_ROUTE_OSPF6);
+ zclient->router_id_update = ospf6_router_id_update_zebra;
zclient->interface_add = ospf6_zebra_if_add;
zclient->interface_delete = ospf6_zebra_if_del;
zclient->interface_up = ospf6_zebra_if_state_update;