Common router id.
diff --git a/ospf6d/ChangeLog b/ospf6d/ChangeLog
index a37c4ac..7778c58 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 dd89d8d..0baaaea 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -44,6 +44,25 @@
 /* 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 @@
   /* 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;