diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index 49b9a4c..9ed186b 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-21  Akihiro Mizutani <mizutani@net-chef.net>
+
+	* bgpd.h, bgp_open.[ch], bgp_debug.c, bgp_vty.[ch], bgp_fsm.c:
+	  Graceful restart capability display.
+
 2005-05-20 Kunihiro Ishiguro  <kunihiro@ipinfusion.com>
 
 	* bgp_debug.c: Cosmetical fixes and log neighbor changes.
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index d28cd93..2874a9a 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -338,7 +338,6 @@
 int
 bgp_stop (struct peer *peer)
 {
-  int established = 0;
   afi_t afi;
   safi_t safi;
   char orf_name[BUFSIZ];
@@ -346,7 +345,6 @@
   /* Increment Dropped count. */
   if (peer->status == Established)
     {
-      established = 1;
       peer->dropped++;
       bgp_fsm_change_status (peer, Idle);
 
@@ -363,11 +361,13 @@
 #ifdef HAVE_SNMP
       bgpTrapBackwardTransition (peer);
 #endif /* HAVE_SNMP */
-    }
 
-  /* Need of clear of peer. */
-  if (established)
-    bgp_clear_route_all (peer);
+      /* Reset uptime. */
+      bgp_uptime_reset (peer);
+
+      /* Need of clear of peer. */
+      bgp_clear_route_all (peer);
+    }
 
   /* Stop read and write threads when exists. */
   BGP_READ_OFF (peer->t_read);
@@ -417,39 +417,26 @@
   /* Clear remote router-id. */
   peer->remote_id.s_addr = 0;
 
-  /* Reset all negotiated variables */
-  peer->afc_nego[AFI_IP][SAFI_UNICAST] = 0;
-  peer->afc_nego[AFI_IP][SAFI_MULTICAST] = 0;
-  peer->afc_nego[AFI_IP][SAFI_MPLS_VPN] = 0;
-  peer->afc_nego[AFI_IP6][SAFI_UNICAST] = 0;
-  peer->afc_nego[AFI_IP6][SAFI_MULTICAST] = 0;
-  peer->afc_adv[AFI_IP][SAFI_UNICAST] = 0;
-  peer->afc_adv[AFI_IP][SAFI_MULTICAST] = 0;
-  peer->afc_adv[AFI_IP][SAFI_MPLS_VPN] = 0;
-  peer->afc_adv[AFI_IP6][SAFI_UNICAST] = 0;
-  peer->afc_adv[AFI_IP6][SAFI_MULTICAST] = 0;
-  peer->afc_recv[AFI_IP][SAFI_UNICAST] = 0;
-  peer->afc_recv[AFI_IP][SAFI_MULTICAST] = 0;
-  peer->afc_recv[AFI_IP][SAFI_MPLS_VPN] = 0;
-  peer->afc_recv[AFI_IP6][SAFI_UNICAST] = 0;
-  peer->afc_recv[AFI_IP6][SAFI_MULTICAST] = 0;
-
-  /* Reset route refresh flag. */
-  UNSET_FLAG (peer->cap, PEER_CAP_REFRESH_ADV);
-  UNSET_FLAG (peer->cap, PEER_CAP_REFRESH_OLD_RCV);
-  UNSET_FLAG (peer->cap, PEER_CAP_REFRESH_NEW_RCV);
-  UNSET_FLAG (peer->cap, PEER_CAP_DYNAMIC_ADV);
-  UNSET_FLAG (peer->cap, PEER_CAP_DYNAMIC_RCV);
+  /* Clear peer capability flag. */
+  peer->cap = 0;
 
   for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
     for (safi = SAFI_UNICAST ; safi < SAFI_MAX ; safi++)
       {
+        /* Reset all negotiated variables */
+        peer->afc_nego[afi][safi] = 0;
+        peer->afc_adv[afi][safi] = 0;
+        peer->afc_recv[afi][safi] = 0;
+
 	/* peer address family capability flags*/
 	peer->af_cap[afi][safi] = 0;
+
 	/* peer address family status flags*/
 	peer->af_sflags[afi][safi] = 0;
+
 	/* Received ORF prefix-filter */
 	peer->orf_plist[afi][safi] = NULL;
+
         /* ORF received prefix-filter pnt */
         sprintf (orf_name, "%s.%d.%d", peer->host, afi, safi);
         prefix_bgp_orf_remove_all (orf_name);
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
index a3e86b0..ae4a7d4 100644
--- a/bgpd/bgp_open.c
+++ b/bgpd/bgp_open.c
@@ -33,7 +33,8 @@
 #include "bgpd/bgp_fsm.h"
 #include "bgpd/bgp_packet.h"
 #include "bgpd/bgp_open.h"
-
+#include "bgpd/bgp_vty.h"
+
 /* BGP-4 Multiprotocol Extentions lead us to the complex world. We can
    negotiate remote peer supports extentions or not. But if
    remote-peer doesn't supports negotiation process itself.  We would
@@ -373,7 +374,7 @@
 	       || cap.code == CAPABILITY_CODE_REFRESH_OLD)
 	{
 	  /* Check length. */
-	  if (cap.length != 0)
+	  if (cap.length != CAPABILITY_CODE_REFRESH_LEN)
 	    {
 	      zlog_info ("%s Route Refresh Capability length error %d",
 			 peer->host, cap.length);
@@ -395,10 +396,81 @@
       else if (cap.code == CAPABILITY_CODE_ORF
 	       || cap.code == CAPABILITY_CODE_ORF_OLD)
 	bgp_capability_orf (peer, &cap, pnt + sizeof (struct capability));
+      else if (cap.code == CAPABILITY_CODE_RESTART)
+       {
+         struct graceful_restart_af graf;
+         u_int16_t restart_flag_time;
+         int restart_bit = 0;
+         int forwarding_bit = 0;
+         u_char *restart_pnt;
+         u_char *restart_end;
+
+         /* Check length. */
+         if (cap.length < CAPABILITY_CODE_RESTART_LEN)
+           {
+             zlog_info ("%s Graceful Restart Capability length error %d",
+                        peer->host, cap.length);
+             bgp_notify_send (peer, BGP_NOTIFY_CEASE, 0);
+             return -1;
+           }
+
+         SET_FLAG (peer->cap, PEER_CAP_RESTART_RCV);
+         restart_flag_time = ntohs(cap.mpc.afi);
+         if (CHECK_FLAG (restart_flag_time, RESTART_R_BIT))
+           restart_bit = 1;
+         UNSET_FLAG (restart_flag_time, 0xF000); 
+         peer->restart_time_rcv = restart_flag_time;
+
+         if (BGP_DEBUG (normal, NORMAL))
+           {
+             zlog_info ("%s OPEN has Graceful Restart capability", peer->host);
+             zlog_info ("%s Peer has%srestarted. Restart Time : %d",
+                        peer->host, restart_bit ? " " : " not ",
+                        peer->restart_time_rcv);
+           }
+
+         restart_pnt = pnt + 4;
+         restart_end = pnt + cap.length + 2;
+
+         while (restart_pnt < restart_end)
+           {
+             memcpy (&graf, restart_pnt, sizeof (struct graceful_restart_af));
+
+             afi = ntohs(graf.afi);
+             safi = graf.safi;
+
+             if (CHECK_FLAG (graf.flag, RESTART_F_BIT))
+               forwarding_bit = 1;
+
+             if (strcmp (afi_safi_print (afi, safi), "Unknown") == 0)
+               {
+                  if (BGP_DEBUG (normal, NORMAL))
+                    zlog_info ("%s Addr-family %d/%d(afi/safi) not supported. I gnore the Graceful Restart capability",
+                               peer->host, afi, safi);
+               }
+             else if (! peer->afc[afi][safi])
+               {
+                  if (BGP_DEBUG (normal, NORMAL))
+                     zlog_info ("%s Addr-family %d/%d(afi/safi) not enabled. Ignore the Graceful Restart capability",
+                                peer->host, afi, safi);
+               }
+             else
+               {
+                 if (BGP_DEBUG (normal, NORMAL))
+                   zlog_info ("%s Address family %s is%spreserved", peer->host,
+                              afi_safi_print (afi, safi), forwarding_bit ? " " : " not ");
+
+                 if (forwarding_bit)
+                   SET_FLAG (peer->af_cap[afi][safi], PEER_CAP_RESTART_AF_RCV);
+               }
+             forwarding_bit = 0;
+             restart_pnt += 4;
+           }
+       }
       else if (cap.code == CAPABILITY_CODE_DYNAMIC)
 	{
 	  /* Check length. */
-	  if (cap.length != 0)
+	  if (cap.length != CAPABILITY_CODE_DYNAMIC_LEN)
 	    {
 	      zlog_info ("%s Dynamic Capability length error %d",
 			 peer->host, cap.length);
@@ -787,6 +859,17 @@
       stream_putc (s, CAPABILITY_CODE_DYNAMIC_LEN);
     }
 
+  /* Graceful restart capability */
+  if (bgp_flag_check (peer->bgp, BGP_FLAG_GRACEFUL_RESTART))
+    {
+      SET_FLAG (peer->cap, PEER_CAP_RESTART_ADV);
+      stream_putc (s, BGP_OPEN_OPT_CAP);
+      stream_putc (s, CAPABILITY_CODE_RESTART_LEN + 2);
+      stream_putc (s, CAPABILITY_CODE_RESTART);
+      stream_putc (s, CAPABILITY_CODE_RESTART_LEN);
+      stream_putw (s, peer->bgp->restart_time);
+     }
+
   /* Total Opt Parm Len. */
   len = stream_get_putp (s) - cp - 1;
   stream_putc_at (s, cp, len);
diff --git a/bgpd/bgp_open.h b/bgpd/bgp_open.h
index af7505a..014bc33 100644
--- a/bgpd/bgp_open.h
+++ b/bgpd/bgp_open.h
@@ -34,36 +34,48 @@
   struct capability_mp mpc;
 };
 
-/* Multiprotocol Extensions capabilities. */
-#define CAPABILITY_CODE_MP              1
-#define CAPABILITY_CODE_MP_LEN          4
+struct graceful_restart_af
+{
+  u_int16_t afi;
+  u_char safi;
+  u_char flag;
+};
 
-/* Route refresh capabilities. */
-#define CAPABILITY_CODE_REFRESH         2
-#define CAPABILITY_CODE_REFRESH_OLD   128
+/* Capability Code */
+#define CAPABILITY_CODE_MP              1 /* Multiprotocol Extensions */
+#define CAPABILITY_CODE_REFRESH         2 /* Route Refresh Capability */
+#define CAPABILITY_CODE_ORF             3 /* Cooperative Route Filtering Capability */
+#define CAPABILITY_CODE_RESTART        64 /* Graceful Restart Capability */
+#define CAPABILITY_CODE_4BYTE_AS       65 /* 4-octet AS number Capability */
+#define CAPABILITY_CODE_DYNAMIC        66 /* Dynamic Capability */
+#define CAPABILITY_CODE_REFRESH_OLD   128 /* Route Refresh Capability(cisco) */
+#define CAPABILITY_CODE_ORF_OLD       130 /* Cooperative Route Filtering Capability(cisco) */
+
+/* Capability Length */
+#define CAPABILITY_CODE_MP_LEN          4
 #define CAPABILITY_CODE_REFRESH_LEN     0
+#define CAPABILITY_CODE_DYNAMIC_LEN     0
+#define CAPABILITY_CODE_RESTART_LEN     2 /* Receiving only case */
 
 /* Cooperative Route Filtering Capability.  */
-#define CAPABILITY_CODE_ORF             3 
-#define CAPABILITY_CODE_ORF_OLD       130
 
-/* ORF Type.  */
+/* ORF Type */
 #define ORF_TYPE_PREFIX                64 
 #define ORF_TYPE_PREFIX_OLD           128
 
-/* ORF Mode.  */
+/* ORF Mode */
 #define ORF_MODE_RECEIVE                1 
 #define ORF_MODE_SEND                   2 
 #define ORF_MODE_BOTH                   3 
 
-/* Dynamic capability.  */
-#define CAPABILITY_CODE_DYNAMIC        66
-#define CAPABILITY_CODE_DYNAMIC_LEN     0
-
 /* Capability Message Action.  */
 #define CAPABILITY_ACTION_SET           0
 #define CAPABILITY_ACTION_UNSET         1
 
+/* Graceful Restart */
+#define RESTART_R_BIT              0x8000
+#define RESTART_F_BIT              0x80
+
 int bgp_open_option_parse (struct peer *, u_char, int *);
 void bgp_open_capability (struct stream *, struct peer *);
 void bgp_capability_vty_out (struct vty *, struct peer *);
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index dda4029..c7de8eb 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -760,7 +760,35 @@
   bgp_flag_unset (bgp, BGP_FLAG_DETERMINISTIC_MED);
   return CMD_SUCCESS;
 }
-
+
+/* "bgp graceful-restart" configuration. */
+DEFUN (bgp_graceful_restart,
+       bgp_graceful_restart_cmd,
+       "bgp graceful-restart",
+       "BGP specific commands\n"
+       "Graceful restart capability parameters\n")
+{
+  struct bgp *bgp;
+
+  bgp = vty->index;
+  bgp_flag_set (bgp, BGP_FLAG_GRACEFUL_RESTART);
+  return CMD_SUCCESS;
+}
+
+DEFUN (no_bgp_graceful_restart,
+       no_bgp_graceful_restart_cmd,
+       "no bgp graceful-restart",
+       NO_STR
+       "BGP specific commands\n"
+       "Graceful restart capability parameters\n")
+{
+  struct bgp *bgp;
+
+  bgp = vty->index;
+  bgp_flag_unset (bgp, BGP_FLAG_GRACEFUL_RESTART);
+  return CMD_SUCCESS;
+}
+
 /* "bgp fast-external-failover" configuration. */
 DEFUN (bgp_fast_external_failover,
        bgp_fast_external_failover_cmd,
@@ -6245,6 +6273,23 @@
 }
 #endif /* HAVE_IPV6 */
 
+char *
+afi_safi_print (afi_t afi, safi_t safi)
+{
+  if (afi == AFI_IP && safi == SAFI_UNICAST)
+    return "IPv4 Unicast";
+  else if (afi == AFI_IP && safi == SAFI_MULTICAST)
+    return "IPv4 Multicast";
+  else if (afi == AFI_IP && safi == SAFI_MPLS_VPN)
+    return "VPNv4 Unicast";
+  else if (afi == AFI_IP6 && safi == SAFI_UNICAST)
+    return "IPv6 Unicast";
+  else if (afi == AFI_IP6 && safi == SAFI_MULTICAST)
+    return "IPv6 Multicast";
+  else
+    return "Unknown";
+}
+
 /* Show BGP peer's information. */
 enum show_type
 {
@@ -6296,11 +6341,9 @@
 
   filter = &p->filter[afi][safi];
 
-  vty_out (vty, " For address family: %s %s%s",
-	   afi == AFI_IP6 ? "IPv6" :
-	   safi == SAFI_MPLS_VPN ? "VPNv4" : "IPv4",
-	   safi == SAFI_MULTICAST ? "Multicast" : "Unicast",
+  vty_out (vty, " For address family: %s%s", afi_safi_print (afi, safi),
 	   VTY_NEWLINE);
+
   if (p->af_group[afi][safi])
     vty_out (vty, "  %s peer-group member%s", p->group->name, VTY_NEWLINE);
 
@@ -6377,11 +6420,11 @@
       vty_out (vty, "  Community attribute sent to this neighbor");
       if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_COMMUNITY)
 	&& CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_EXT_COMMUNITY))
-	vty_out (vty, " (both)%s", VTY_NEWLINE);
+	vty_out (vty, "(both)%s", VTY_NEWLINE);
       else if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_EXT_COMMUNITY))
-	vty_out (vty, " (extended)%s", VTY_NEWLINE);
+	vty_out (vty, "(extended)%s", VTY_NEWLINE);
       else 
-	vty_out (vty, " (standard)%s", VTY_NEWLINE);
+	vty_out (vty, "(standard)%s", VTY_NEWLINE);
     }
   if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_DEFAULT_ORIGINATE))
     {
@@ -6485,6 +6528,8 @@
   struct bgp *bgp;
   char buf1[BUFSIZ];
   char timebuf[BGP_UPTIME_LEN];
+  afi_t afi;
+  safi_t safi;
 
   bgp = p->bgp;
 
@@ -6549,11 +6594,7 @@
   /* Capability. */
   if (p->status == Established) 
     {
-      if (CHECK_FLAG (p->cap, PEER_CAP_REFRESH_ADV)
-	  || CHECK_FLAG (p->cap, PEER_CAP_REFRESH_NEW_RCV)
-	  || CHECK_FLAG (p->cap, PEER_CAP_REFRESH_OLD_RCV)
-	  || CHECK_FLAG (p->cap, PEER_CAP_DYNAMIC_ADV)
-	  || CHECK_FLAG (p->cap, PEER_CAP_DYNAMIC_RCV)
+      if (p->cap
 	  || p->afc_adv[AFI_IP][SAFI_UNICAST]
 	  || p->afc_recv[AFI_IP][SAFI_UNICAST]
 	  || p->afc_adv[AFI_IP][SAFI_MULTICAST]
@@ -6577,11 +6618,8 @@
 	      if (CHECK_FLAG (p->cap, PEER_CAP_DYNAMIC_ADV))
 		vty_out (vty, " advertised");
 	      if (CHECK_FLAG (p->cap, PEER_CAP_DYNAMIC_RCV))
-		{
-		  if (CHECK_FLAG (p->cap, PEER_CAP_DYNAMIC_ADV))
-		    vty_out (vty, " and");
-		  vty_out (vty, " received");
-		}
+		vty_out (vty, " %sreceived",
+			 CHECK_FLAG (p->cap, PEER_CAP_DYNAMIC_ADV) ? "and " : "");
 	      vty_out (vty, "%s", VTY_NEWLINE);
 	    }
 
@@ -6595,91 +6633,61 @@
 		vty_out (vty, " advertised");
 	      if (CHECK_FLAG (p->cap, PEER_CAP_REFRESH_NEW_RCV)
 		  || CHECK_FLAG (p->cap, PEER_CAP_REFRESH_OLD_RCV))
-		{
-		  if (CHECK_FLAG (p->cap, PEER_CAP_REFRESH_ADV))
-		    vty_out (vty, " and");
-		  vty_out (vty, " received");
-		  if (CHECK_FLAG (p->cap, PEER_CAP_REFRESH_NEW_RCV)
-		      && CHECK_FLAG (p->cap, PEER_CAP_REFRESH_OLD_RCV))
-		    vty_out (vty, " (old and new)");
-		  else if (CHECK_FLAG (p->cap, PEER_CAP_REFRESH_OLD_RCV))
-		    vty_out (vty, " (old)");
-		  else 
-		    vty_out (vty, " (new)");
-		}
+		vty_out (vty, " %sreceived(%s)",
+			 CHECK_FLAG (p->cap, PEER_CAP_REFRESH_ADV) ? "and " : "",
+			 (CHECK_FLAG (p->cap, PEER_CAP_REFRESH_OLD_RCV)
+			  && CHECK_FLAG (p->cap, PEER_CAP_REFRESH_NEW_RCV)) ?
+			 "old & new" : CHECK_FLAG (p->cap, PEER_CAP_REFRESH_OLD_RCV) ? "old" : "new");
+
 	      vty_out (vty, "%s", VTY_NEWLINE);
 	    }
 
-	  /* IPv4 */
-	  if (p->afc_adv[AFI_IP][SAFI_UNICAST]
-	      || p->afc_recv[AFI_IP][SAFI_UNICAST]) 
-	    {
-	      vty_out (vty, "    Address family IPv4 Unicast:");
-	      if (p->afc_adv[AFI_IP][SAFI_UNICAST]) 
-		vty_out (vty, " advertised");
-	      if (p->afc_recv[AFI_IP][SAFI_UNICAST])
+	  /* Multiprotocol Extensions */
+	  for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
+	    for (safi = SAFI_UNICAST ; safi < SAFI_MAX ; safi++)
+	      if (p->afc_adv[afi][safi] || p->afc_recv[afi][safi])
 		{
-		  if (p->afc_adv[AFI_IP][SAFI_UNICAST])
-		    vty_out (vty, " and");
-		  vty_out (vty, " received");
-		}
-	      vty_out (vty, "%s", VTY_NEWLINE);
-	    }
-	  if (p->afc_adv[AFI_IP][SAFI_MULTICAST] || p->afc_recv[AFI_IP][SAFI_MULTICAST]) 
+		  vty_out (vty, "    Address family %s:", afi_safi_print (afi, safi));
+		  if (p->afc_adv[afi][safi]) 
+		    vty_out (vty, " advertised");
+		  if (p->afc_recv[afi][safi])
+		    vty_out (vty, " %sreceived", p->afc_adv[afi][safi] ? "and " : "");
+		  vty_out (vty, "%s", VTY_NEWLINE);
+		} 
+
+	  /* Gracefull Restart */
+	  if (CHECK_FLAG (p->cap, PEER_CAP_RESTART_RCV)
+	      || CHECK_FLAG (p->cap, PEER_CAP_RESTART_ADV))
 	    {
-	      vty_out (vty, "    Address family IPv4 Multicast:");
-	      if (p->afc_adv[AFI_IP][SAFI_MULTICAST]) 
+	      vty_out (vty, "    Graceful Restart Capabilty:");
+	      if (CHECK_FLAG (p->cap, PEER_CAP_RESTART_ADV))
 		vty_out (vty, " advertised");
-	      if (p->afc_recv[AFI_IP][SAFI_MULTICAST])
-		{
-		  if (p->afc_adv[AFI_IP][SAFI_MULTICAST])
-		    vty_out (vty, " and");
-		  vty_out (vty, " received");
-		}
+	      if (CHECK_FLAG (p->cap, PEER_CAP_RESTART_RCV))
+		vty_out (vty, " %sreceived",
+			 CHECK_FLAG (p->cap, PEER_CAP_RESTART_ADV) ? "and " : "");
 	      vty_out (vty, "%s", VTY_NEWLINE);
-	    }
-	  if (p->afc_adv[AFI_IP][SAFI_MPLS_VPN] || p->afc_recv[AFI_IP][SAFI_MPLS_VPN]) 
-	    {
-	      vty_out (vty, "    Address family VPNv4 Unicast:");
-	      if (p->afc_adv[AFI_IP][SAFI_MPLS_VPN]) 
-		vty_out (vty, " advertised");
-	      if (p->afc_recv[AFI_IP][SAFI_MPLS_VPN])
+
+	      if (CHECK_FLAG (p->cap, PEER_CAP_RESTART_RCV))
 		{
-		  if (p->afc_adv[AFI_IP][SAFI_MPLS_VPN])
-		    vty_out (vty, " and");
-		  vty_out (vty, " received");
+		  int restart_af_count = 0;
+
+		  vty_out (vty, "      Remote Restart timer is %d seconds%s",
+			   p->restart_time_rcv, VTY_NEWLINE);	
+		  vty_out (vty, "      Address families preserved by peer:%s        ", VTY_NEWLINE);
+
+		  for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
+		    for (safi = SAFI_UNICAST ; safi < SAFI_MAX ; safi++)
+		      if (CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_RESTART_AF_RCV))
+			{
+			  vty_out (vty, "%s%s", restart_af_count ? ", " : "",
+				   afi_safi_print (afi, safi));
+			  restart_af_count++;
+		      }
+		  if (! restart_af_count)
+		    vty_out (vty, "none");
+		  vty_out (vty, "%s", VTY_NEWLINE);
 		}
-	      vty_out (vty, "%s", VTY_NEWLINE);
 	    }
-	  /* IPv6 */
-#ifdef HAVE_IPV6
-	  if (p->afc_adv[AFI_IP6][SAFI_UNICAST] || p->afc_recv[AFI_IP6][SAFI_UNICAST]) 
-	    {
-	      vty_out (vty, "    Address family IPv6 Unicast:");
-	      if (p->afc_adv[AFI_IP6][SAFI_UNICAST]) 
-		vty_out (vty, " advertised");
-	      if (p->afc_recv[AFI_IP6][SAFI_UNICAST])
-		{
-		  if (p->afc_adv[AFI_IP6][SAFI_UNICAST])
-		    vty_out (vty, " and");
-		  vty_out (vty, " received");
-		}
-	      vty_out (vty, "%s", VTY_NEWLINE);
-	    }
-	  if (p->afc_adv[AFI_IP6][SAFI_MULTICAST] || p->afc_recv[AFI_IP6][SAFI_MULTICAST]) 
-	    {
-	      vty_out (vty, "    Address family IPv6 Multicast:");
-	      if (p->afc_adv[AFI_IP6][SAFI_MULTICAST]) 
-		vty_out (vty, " advertised");
-	      if (p->afc_recv[AFI_IP6][SAFI_MULTICAST])
-		{
-		  if (p->afc_adv[AFI_IP6][SAFI_MULTICAST])
-		    vty_out (vty, " and");
-		  vty_out (vty, " received");
-		}
-	      vty_out (vty, "%s", VTY_NEWLINE);
-	    }
-#endif /* HAVE_IPV6 */
 	}
     }
 
@@ -6717,18 +6725,10 @@
   vty_out (vty, "%s", VTY_NEWLINE);
 
   /* Address Family Information */
-  if (p->afc[AFI_IP][SAFI_UNICAST])
-    bgp_show_peer_afi (vty, p, AFI_IP, SAFI_UNICAST);
-  if (p->afc[AFI_IP][SAFI_MULTICAST])
-    bgp_show_peer_afi (vty, p, AFI_IP, SAFI_MULTICAST);
-  if (p->afc[AFI_IP][SAFI_MPLS_VPN])
-    bgp_show_peer_afi (vty, p, AFI_IP, SAFI_MPLS_VPN);
-#ifdef HAVE_IPV6
-  if (p->afc[AFI_IP6][SAFI_UNICAST])
-    bgp_show_peer_afi (vty, p, AFI_IP6, SAFI_UNICAST);
-  if (p->afc[AFI_IP6][SAFI_MULTICAST])
-    bgp_show_peer_afi (vty, p, AFI_IP6, SAFI_MULTICAST);
-#endif /* HAVE_IPV6 */
+  for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
+    for (safi = SAFI_UNICAST ; safi < SAFI_MAX ; safi++)
+      if (p->afc[afi][safi])
+	bgp_show_peer_afi (vty, p, afi, safi);
 
   vty_out (vty, "  Connections established %d; dropped %d%s",
 	   p->established, p->dropped,
@@ -7849,6 +7849,12 @@
   /* "bgp deterministic-med" commands */
   install_element (BGP_NODE, &bgp_deterministic_med_cmd);
   install_element (BGP_NODE, &no_bgp_deterministic_med_cmd);
+
+#if 0
+  /* "bgp graceful-restart" commands */
+  install_element (BGP_NODE, &bgp_graceful_restart_cmd);
+  install_element (BGP_NODE, &no_bgp_graceful_restart_cmd);
+#endif /* 0 */
  
   /* "bgp fast-external-failover" commands */
   install_element (BGP_NODE, &bgp_fast_external_failover_cmd);
diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h
index 15ad581..74bc185 100644
--- a/bgpd/bgp_vty.h
+++ b/bgpd/bgp_vty.h
@@ -19,3 +19,4 @@
 02111-1307, USA.  */
 
 void bgp_vty_init ();
+char *afi_safi_print (afi_t, safi_t);
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 510e296..47df3c8 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -515,7 +515,6 @@
   if (! bgp)
     return -1;
 
-  bgp_config_set (bgp, BGP_CONFIG_DEFAULT_LOCAL_PREF);
   bgp->default_local_pref = local_pref;
 
   return 0;
@@ -527,7 +526,6 @@
   if (! bgp)
     return -1;
 
-  bgp_config_unset (bgp, BGP_CONFIG_DEFAULT_LOCAL_PREF);
   bgp->default_local_pref = BGP_DEFAULT_LOCAL_PREF;
 
   return 0;
@@ -1685,6 +1683,8 @@
   bgp->default_local_pref = BGP_DEFAULT_LOCAL_PREF;
   bgp->default_holdtime = BGP_DEFAULT_HOLDTIME;
   bgp->default_keepalive = BGP_DEFAULT_KEEPALIVE;
+  bgp->restart_time = BGP_DEFAULT_RESTART_TIME;
+  bgp->stalepath_time = BGP_DEFAULT_STALEPATH_TIME;
 
   bgp->as = *as;
 
@@ -4612,7 +4612,11 @@
       /* BGP deterministic-med. */
       if (bgp_flag_check (bgp, BGP_FLAG_DETERMINISTIC_MED))
 	vty_out (vty, " bgp deterministic-med%s", VTY_NEWLINE);
-      
+
+      /* BGP graceful-restart. */
+      if (bgp_flag_check (bgp, BGP_FLAG_GRACEFUL_RESTART))
+       vty_out (vty, " bgp graceful-restart%s", VTY_NEWLINE);
+
       /* BGP bestpath method. */
       if (bgp_flag_check (bgp, BGP_FLAG_ASPATH_IGNORE))
 	vty_out (vty, " bgp bestpath as-path ignore%s", VTY_NEWLINE);
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index b40a68c..818f7dc 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -70,7 +70,6 @@
 #define BGP_CONFIG_ROUTER_ID              (1 << 0)
 #define BGP_CONFIG_CLUSTER_ID             (1 << 1)
 #define BGP_CONFIG_CONFEDERATION          (1 << 2)
-#define BGP_CONFIG_DEFAULT_LOCAL_PREF     (1 << 3)
 
   /* BGP router identifier.  */
   struct in_addr router_id;
@@ -97,6 +96,7 @@
 #define BGP_FLAG_IMPORT_CHECK             (1 << 9)
 #define BGP_FLAG_NO_FAST_EXT_FAILOVER     (1 << 10)
 #define BGP_FLAG_LOG_NEIGHBOR_CHANGES     (1 << 11)
+#define BGP_FLAG_GRACEFUL_RESTART         (1 << 12)
 
   /* BGP Per AF flags */
   u_int16_t af_flags[AFI_MAX][SAFI_MAX];
@@ -136,6 +136,10 @@
   /* BGP default timer.  */
   u_int32_t default_holdtime;
   u_int32_t default_keepalive;
+
+  /* BGP graceful restart */
+  u_int16_t restart_time;
+  u_int16_t stalepath_time;
 };
 
 /* BGP peer-group support. */
@@ -291,6 +295,8 @@
 #define PEER_CAP_REFRESH_NEW_RCV            (1 << 2) /* refresh rfc received */
 #define PEER_CAP_DYNAMIC_ADV                (1 << 3) /* dynamic advertised */
 #define PEER_CAP_DYNAMIC_RCV                (1 << 4) /* dynamic received */
+#define PEER_CAP_RESTART_ADV                (1 << 5) /* restart advertised */
+#define PEER_CAP_RESTART_RCV                (1 << 6) /* restart received */
 
   /* Capability Flags.*/
   u_int16_t af_cap[AFI_MAX][SAFI_MAX];
@@ -300,6 +306,10 @@
 #define PEER_CAP_ORF_PREFIX_RM_RCV          (1 << 3) /* receive-mode received */
 #define PEER_CAP_ORF_PREFIX_SM_OLD_RCV      (1 << 4) /* send-mode received */
 #define PEER_CAP_ORF_PREFIX_RM_OLD_RCV      (1 << 5) /* receive-mode received */
+#define PEER_CAP_RESTART_AF_RCV             (1 << 6) /* graceful restart received */
+
+  /* Gracefull Restart */
+  u_int16_t restart_time_rcv;
 
   /* Global configuration flags. */
   u_int32_t flags;
@@ -641,6 +651,10 @@
 /* BGP default local preference.  */
 #define BGP_DEFAULT_LOCAL_PREF                 100
 
+/* BGP graceful restart  */
+#define BGP_DEFAULT_RESTART_TIME               120
+#define BGP_DEFAULT_STALEPATH_TIME             360
+
 /* SAFI which used in open capability negotiation.  */
 #define BGP_SAFI_VPNV4                         128
 #define BGP_SAFI_VPNV6                         129
