diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index 0e81fc0..0aac403 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,12 @@
+2004-07-09 Paul Jakma <paul@dishone.st>
+
+	* Merge of GNU Zebra cvs2svn changesets r799, r800 and r807.
+	* bgp_dump.c: (bgp_dump_attr) cleanup. return status code. check
+	  attributes present before printing.
+	* bgp_dump.c: update bgp_dump_attr prototype.
+	* bgp_packet.c: (bgp_update_receive) init attrstr. check status
+	  of bgp_dump_attr. Log end-of-rib UPDATEs.
+
 2004-07-09 Sowmini Varadhan <sowmini.varadhan@sun.com>
 
 	* bgp_packet.c: (bgp_collision_detect) Send NOTIFY on new socket
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c
index 8141c8b..9c5208d 100644
--- a/bgpd/bgp_debug.c
+++ b/bgpd/bgp_debug.c
@@ -158,16 +158,18 @@
 char *bgp_origin_long_str[] = {"IGP","EGP","incomplete"};
 
 /* Dump attribute. */
-void
+int
 bgp_dump_attr (struct peer *peer, struct attr *attr, char *buf, size_t size)
 {
-
   if (! attr)
-    return;
+    return 0;
 
-  snprintf (buf, size, "nexthop %s", inet_ntoa (attr->nexthop));
-  snprintf (buf + strlen (buf), size - strlen (buf), ", origin %s",
-	    bgp_origin_str[attr->origin]);
+  if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_NEXT_HOP)))
+    snprintf (buf, size, "nexthop %s", inet_ntoa (attr->nexthop));
+
+  if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_ORIGIN)))
+    snprintf (buf + strlen (buf), size - strlen (buf), ", origin %s",
+	      bgp_origin_str[attr->origin]);
 
 #ifdef HAVE_IPV6
   {
@@ -186,42 +188,47 @@
   }
 #endif /* HAVE_IPV6 */
 
-  if (peer_sort (peer) == BGP_PEER_IBGP)
+  if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_LOCAL_PREF)))
     snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %d",
 	      attr->local_pref);
 
-  if (attr->med)
+  if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC))) 
     snprintf (buf + strlen (buf), size - strlen (buf), ", metric %d",
 	      attr->med);
 
-  if (attr->community) 
+  if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_COMMUNITIES))) 
     snprintf (buf + strlen (buf), size - strlen (buf), ", community %s",
 	      community_str (attr->community));
 
-  if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_ATOMIC_AGGREGATE))
+  if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_ATOMIC_AGGREGATE)))
     snprintf (buf + strlen (buf), size - strlen (buf), ", atomic-aggregate");
 
-  if (attr->aggregator_as)
+  if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_AGGREGATOR)))
     snprintf (buf + strlen (buf), size - strlen (buf), ", aggregated by %d %s",
 	      attr->aggregator_as, inet_ntoa (attr->aggregator_addr));
 
-  if (attr->flag & ATTR_FLAG_BIT (BGP_ATTR_ORIGINATOR_ID))
+  if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_ORIGINATOR_ID)))
     snprintf (buf + strlen (buf), size - strlen (buf), ", originator %s",
 	      inet_ntoa (attr->originator_id));
 
-  if (attr->flag & ATTR_FLAG_BIT (BGP_ATTR_CLUSTER_LIST))
+  if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_CLUSTER_LIST)))
     {
       int i;
 
-      snprintf (buf + strlen (buf), size - strlen (buf), ", clusterlist ");
+      snprintf (buf + strlen (buf), size - strlen (buf), ", clusterlist");
       for (i = 0; i < attr->cluster->length / 4; i++)
-	snprintf (buf + strlen (buf), size - strlen (buf), "%s",
+	snprintf (buf + strlen (buf), size - strlen (buf), " %s",
 		  inet_ntoa (attr->cluster->list[i]));
     }
 
-  if (attr->aspath) 
+  if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_AS_PATH))) 
     snprintf (buf + strlen (buf), size - strlen (buf), ", path %s",
 	      aspath_print (attr->aspath));
+
+  if (strlen (buf) > 1)
+    return 1;
+  else
+    return 0;
 }
 
 /* dump notify packet */
diff --git a/bgpd/bgp_debug.h b/bgpd/bgp_debug.h
index 06ba075..14a8c5f 100644
--- a/bgpd/bgp_debug.h
+++ b/bgpd/bgp_debug.h
@@ -106,7 +106,7 @@
 
 extern char *bgp_type_str[];
 
-void bgp_dump_attr (struct peer *, struct attr *, char *, size_t);
+int bgp_dump_attr (struct peer *, struct attr *, char *, size_t);
 void bgp_notify_print (struct peer *, struct bgp_notify *, char *);
 
 extern struct message bgp_status_msg[];
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 37f5afd..4282027 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -1375,7 +1375,7 @@
   struct bgp_nlri withdraw;
   struct bgp_nlri mp_update;
   struct bgp_nlri mp_withdraw;
-  char attrstr[BUFSIZ];
+  char attrstr[BUFSIZ] = "";
 
   /* Status must be Established. */
   if (peer->status != Established) 
@@ -1478,9 +1478,11 @@
   /* Logging the attribute. */
   if (BGP_DEBUG (update, UPDATE_IN))
     {
-      bgp_dump_attr (peer, &attr, attrstr, BUFSIZ);
-      zlog (peer->log, LOG_INFO, "%s rcvd UPDATE w/ attr: %s",
-	    peer->host, attrstr);
+      ret= bgp_dump_attr (peer, &attr, attrstr, BUFSIZ);
+
+      if (ret)
+	zlog (peer->log, LOG_INFO, "%s rcvd UPDATE w/ attr: %s",
+	      peer->host, attrstr);
     }
 
   /* Network Layer Reachability Information. */
@@ -1518,6 +1520,15 @@
 
 	  bgp_nlri_parse (peer, &attr, &update);
 	}
+
+      if (! attribute_len && ! withdraw_len)
+	{
+	  /* End-of-RIB received */
+
+	  if (BGP_DEBUG (update, UPDATE_IN))
+	    zlog (peer->log, LOG_INFO, "rcvd End-of-RIB for IPv4 Unicast from %s",
+		  peer->host);
+	}
     }
   if (peer->afc[AFI_IP][SAFI_MULTICAST])
     {
@@ -1530,6 +1541,18 @@
 	  && mp_withdraw.afi == AFI_IP 
 	  && mp_withdraw.safi == SAFI_MULTICAST)
 	bgp_nlri_parse (peer, NULL, &mp_withdraw);
+
+      if (attribute_len == 6 && ! withdraw_len
+	  && mp_withdraw.afi == AFI_IP
+	  && mp_withdraw.safi == SAFI_MULTICAST
+	  && mp_withdraw.length == 0)
+	{
+	  /* End-of-RIB received */
+
+	  if (BGP_DEBUG (update, UPDATE_IN))
+	    zlog (peer->log, LOG_INFO, "rcvd End-of-RIB for IPv4 Multicast from %s",
+		  peer->host);
+	}
     }
   if (peer->afc[AFI_IP6][SAFI_UNICAST])
     {
@@ -1542,6 +1565,18 @@
 	  && mp_withdraw.afi == AFI_IP6 
 	  && mp_withdraw.safi == SAFI_UNICAST)
 	bgp_nlri_parse (peer, NULL, &mp_withdraw);
+
+      if (attribute_len == 6 && ! withdraw_len
+	  && mp_withdraw.afi == AFI_IP6
+	  && mp_withdraw.safi == SAFI_UNICAST
+	  && mp_withdraw.length == 0)
+	{
+	  /* End-of-RIB received */
+
+	  if (BGP_DEBUG (update, UPDATE_IN))
+	    zlog (peer->log, LOG_INFO, "rcvd End-of-RIB for IPv6 Unicast from %s",
+		  peer->host);
+	}
     }
   if (peer->afc[AFI_IP6][SAFI_MULTICAST])
     {
@@ -1554,6 +1589,18 @@
 	  && mp_withdraw.afi == AFI_IP6 
 	  && mp_withdraw.safi == SAFI_MULTICAST)
 	bgp_nlri_parse (peer, NULL, &mp_withdraw);
+
+      if (attribute_len == 6 && ! withdraw_len
+	  && mp_withdraw.afi == AFI_IP6
+	  && mp_withdraw.safi == SAFI_MULTICAST
+	  && mp_withdraw.length == 0)
+	{
+	  /* End-of-RIB received */
+
+	  if (BGP_DEBUG (update, UPDATE_IN))
+	    zlog (peer->log, LOG_INFO, "rcvd End-of-RIB for IPv6 Multicast from %s",
+		  peer->host);
+	}
     }
   if (peer->afc[AFI_IP][SAFI_MPLS_VPN])
     {
@@ -1566,6 +1613,18 @@
 	  && mp_withdraw.afi == AFI_IP 
 	  && mp_withdraw.safi == BGP_SAFI_VPNV4)
 	bgp_nlri_parse_vpnv4 (peer, NULL, &mp_withdraw);
+
+      if (attribute_len == 6 && ! withdraw_len
+	  && mp_withdraw.afi == AFI_IP
+	  && mp_withdraw.safi == BGP_SAFI_VPNV4
+	  && mp_withdraw.length == 0)
+	{
+	  /* End-of-RIB received */
+
+	  if (BGP_DEBUG (update, UPDATE_IN))
+	    zlog (peer->log, LOG_INFO, "rcvd End-of-RIB for VPNv4 Unicast from %s",
+		  peer->host);
+	}
     }
 
   /* Everything is done.  We unintern temporary structures which
