diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index 2bcce1c..d5ab328 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,11 @@
+2004-10-03 James R. Leu <jleu at mindspring.com>
+
+	* bgp_vty.c: Router id from zebra can be manually overriden.
+	* bgp_zebra.c: Read router id related messages from zebra daemon.
+	  Remove own code related with router id selection.
+	* bgpd.c, bgpd.h: Remove own router id selection code. Use the one
+	  from zebra daemon if it isn't manually overriden.
+
 2004-09-26 Hasso Tepper <hasso at quagga.net>
 
 	* bgp_aspath.c, bgp_packet.c, bgp_vty.c: Fix compiler warnings.
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 27a3c2e..6b3c498 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -41,6 +41,8 @@
 #include "bgpd/bgp_zebra.h"
 #include "bgpd/bgp_table.h"
 
+extern struct in_addr router_id_zebra;
+
 /* Utility function to get address family from current node.  */
 afi_t
 bgp_node_afi (struct vty *vty)
@@ -400,6 +402,7 @@
       return CMD_WARNING;
     }
 
+  bgp->router_id_static = id;
   bgp_router_id_set (bgp, &id);
 
   return CMD_SUCCESS;
@@ -427,14 +430,15 @@
 	  return CMD_WARNING;
 	}
 
-      if (! IPV4_ADDR_SAME (&bgp->router_id, &id))
+      if (! IPV4_ADDR_SAME (&bgp->router_id_static, &id))
 	{
 	  vty_out (vty, "%% BGP router-id doesn't match%s", VTY_NEWLINE);
 	  return CMD_WARNING;
 	}
     }
 
-  bgp_router_id_unset (bgp);
+  bgp->router_id_static.s_addr = 0;
+  bgp_router_id_set (bgp, &router_id_zebra);
 
   return CMD_SUCCESS;
 }
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 42b8fc7..6226a93 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -39,61 +39,25 @@
 
 /* All information about zebra. */
 static struct zclient *zclient = NULL;
+struct in_addr router_id_zebra;
 
-/* Update default router id. */
+/* Router-id update message from zebra. */
 int
-bgp_if_update (struct interface *ifp)
+bgp_router_id_update (int command, struct zclient *zclient, zebra_size_t length)
 {
-  struct bgp *bgp;
-  struct listnode *cn;
+  struct prefix router_id;
   struct listnode *nn;
-  struct listnode *nm;
-  struct peer *peer;
+  struct bgp *bgp;
 
-  for (cn = listhead (ifp->connected); cn; nextnode (cn))
+  zebra_router_id_update_read(zclient->ibuf,&router_id);
+  router_id_zebra = router_id.u.prefix4;
+
+  LIST_LOOP (bm->bgp, bgp, nn)
     {
-      struct connected *co;
-      struct in_addr addr;
-
-      co = getdata (cn);
-
-      if (co->address->family == AF_INET)
-	{
-	  addr = co->address->u.prefix4;
-
-	  /* Ignore NET127. */
-	  if (IPV4_NET127 (ntohl (addr.s_addr)))
-	    continue;
-
-	  LIST_LOOP (bm->bgp, bgp, nn)
-	    {
-	      /* Respect configured router id */
-	      if (! (bgp->config & BGP_CONFIG_ROUTER_ID))
-		if (ntohl (bgp->router_id.s_addr) < ntohl (addr.s_addr))
-		  {
-		    bgp->router_id = addr;
-		    LIST_LOOP (bgp->peer, peer, nm)
-		      {
-			peer->local_id = addr;
-		      }
-		  }
-	    }
-	}
+      if (!bgp->router_id_static.s_addr)
+      bgp_router_id_set (bgp, &router_id.u.prefix4);
     }
-  return 0;
-}
 
-int
-bgp_if_update_all ()
-{
-  struct listnode *node;
-  struct interface *ifp;
-
-  for (node = listhead (iflist); node; node = nextnode (node))
-    {
-      ifp = getdata (node);
-      bgp_if_update (ifp);
-    }
   return 0;
 }
 
@@ -104,7 +68,6 @@
   struct interface *ifp;
 
   ifp = zebra_interface_add_read (zclient->ibuf);
-  bgp_if_update (ifp);
 
   return 0;
 }
@@ -206,8 +169,6 @@
   if (ifc == NULL)
     return 0;
 
-  bgp_if_update (ifc->ifp);
-
   if (if_is_operative (ifc->ifp))
     bgp_connected_add (ifc);
 
@@ -225,8 +186,6 @@
   if (ifc == NULL)
     return 0;
 
-  bgp_if_update (ifc->ifp);
-
   if (if_is_operative (ifc->ifp))
     bgp_connected_delete (ifc);
 
@@ -987,6 +946,7 @@
   /* Set default values. */
   zclient = zclient_new ();
   zclient_init (zclient, ZEBRA_ROUTE_BGP);
+  zclient->router_id_update = bgp_router_id_update;
   zclient->interface_add = bgp_interface_add;
   zclient->interface_delete = bgp_interface_delete;
   zclient->interface_address_add = bgp_interface_address_add;
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 6afbe95..61ffe27 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -63,6 +63,8 @@
 /* BGP process wide configuration.  */
 static struct bgp_master bgp_master;
 
+extern struct in_addr router_id_zebra;
+
 /* BGP process wide configuration pointer to export.  */
 struct bgp_master *bm;
 
@@ -182,42 +184,6 @@
   return 0;
 }
 
-/* Unset BGP router identifier. */
-int
-bgp_router_id_unset (struct bgp *bgp)
-{
-  struct peer *peer;
-  struct listnode *nn;
-
-  if (! bgp_config_check (bgp, BGP_CONFIG_ROUTER_ID))
-    return 0;
-
-  bgp->router_id.s_addr = 0;
-  bgp_config_unset (bgp, BGP_CONFIG_ROUTER_ID);
-
-  /* Clear peer router id configuration.  */
-  LIST_LOOP (bgp->peer, peer, nn)
-    {
-      peer->local_id.s_addr = 0;
-    }
-
-  /* Set router-id from interface's address. */
-  bgp_if_update_all ();
-
-  /* Reset all BGP sessions to use new router-id.  */
-  LIST_LOOP (bgp->peer, peer, nn)
-    {
-      if (peer->status == Established)
-       {
-         peer->last_reset = PEER_DOWN_RID_CHANGE;
-         bgp_notify_send (peer, BGP_NOTIFY_CEASE,
-                          BGP_NOTIFY_CEASE_CONFIG_CHANGE);
-       }
-    }
-
-  return 0;
-}
-
 /* BGP's cluster-id control. */
 int
 bgp_cluster_id_set (struct bgp *bgp, struct in_addr *cluster_id)
@@ -1910,7 +1876,7 @@
 
   bgp = bgp_create (as, name);
   listnode_add (bm->bgp, bgp);
-  bgp_if_update_all ();
+  bgp_router_id_set(bgp, &router_id_zebra);
   *bgp_val = bgp;
 
   return 0;
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index 61472d8..ed3f4d1 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -76,6 +76,7 @@
 
   /* BGP router identifier.  */
   struct in_addr router_id;
+  struct in_addr router_id_static;
 
   /* BGP route reflector cluster ID.  */
   struct in_addr cluster_id;
