Index: source/ariba/overlay/BaseOverlay.cpp
===================================================================
--- source/ariba/overlay/BaseOverlay.cpp	(revision 5914)
+++ source/ariba/overlay/BaseOverlay.cpp	(revision 5916)
@@ -201,4 +201,32 @@
 }
 
+
+std::string BaseOverlay::getLinkHTMLInfo() {
+	std::ostringstream s;
+
+	s << "<h2 color=\"#606060\">Links</h2>";
+	s << "<table cellpadding=\"0\" border=\"0\" cellspacing=\"0\">";
+	s << "<tr background=\"#e0e0e0\">";
+	s << "<td>Id</td><td>Remote</td><td>Path</td>";
+	s << "</tr>";
+
+	BOOST_FOREACH( LinkDescriptor* ld, links ) {
+		if (!ld->isVital() || ld->service != OverlayInterface::OVERLAY_SERVICE_ID) continue;
+		s << "<tr>";
+		s << "<td>" << ld->overlayId.toString().substr(0,4) << "..</td>";
+		s << "<td>" << ld->remoteNode.toString().substr(0,4) << "..</td>";
+		s << "<td>";
+		if (ld->routeRecord.size()>0) {
+			for (size_t i=0; i<ld->routeRecord.size(); i++)
+				s << ld->routeRecord[i].toString().substr(0,4) << ".. ";
+		}
+		s << "</td>";
+		s << "</tr>";
+	}
+	s << "</table>";
+
+	return s.str();
+}
+
 /// shows the current link state
 void BaseOverlay::showLinks() {
@@ -278,5 +306,5 @@
 			return bc->sendMessage(next_link->communicationId, message);
 		} else {
-			logging_error("Could not send message. No relay hop found to "
+			logging_warn("Could not send message. No relay hop found to "
 					<< destination)
 			return -1;
@@ -289,5 +317,5 @@
 		LinkID next_id = overlayInterface->getNextLinkId( destination );
 		if (next_id.isUnspecified()) {
-			logging_error("Could not send message. No next hop found to " <<
+			logging_warn("Could not send message. No next hop found to " <<
 				destination );
 			return -1;
@@ -303,5 +331,5 @@
 		// no-> error, dropping message
 		else {
-			logging_error("Could not send message. Link not known or up");
+			logging_warn("Could not send message. Link not known or up");
 			return -1;
 		}
@@ -386,9 +414,9 @@
 		relay_route& route = *i;
 		LinkDescriptor* ld = getDescriptor(route.link);
+
+		// relay link still used and alive?
 		if (ld==NULL
-			|| !ld->up
-			|| ld->keepAliveMissed != 0
-			|| !ld->communicationUp
-			|| difftime(route.used, time(NULL)) > 4) {
+			|| !ld->isDirectVital()
+			|| difftime(route.used, time(NULL)) > 8) {
 			logging_info("Forgetting relay information to node "
 					<< route.node.toString() );
@@ -449,7 +477,10 @@
 				// refresh timer
 				route.used = time(NULL);
-
-				// route has a shorter hop count? yes-> replace
-				if (route.hops > message->getNumHops() ) {
+				LinkDescriptor* rld = getDescriptor(route.link);
+
+				// route has a shorter hop count or old link is dead? yes-> replace
+				if (route.hops > message->getNumHops()
+					|| rld == NULL
+					|| !rld->isDirectVital()) {
 					logging_info("Updating relay information to node "
 						<< route.node.toString()
@@ -480,5 +511,5 @@
 		if (route.node == remote ) {
 			LinkDescriptor* ld = getDescriptor( route.link );
-			if (ld==NULL || !ld->up || !ld->communicationUp) return NULL; else {
+			if (ld==NULL || !ld->isDirectVital()) return NULL; else {
 				route.used = time(NULL);
 				return ld;
Index: source/ariba/overlay/BaseOverlay.h
===================================================================
--- source/ariba/overlay/BaseOverlay.h	(revision 5914)
+++ source/ariba/overlay/BaseOverlay.h	(revision 5916)
@@ -347,4 +347,5 @@
 	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+	std::string getLinkHTMLInfo();
 
 private:
Index: source/ariba/overlay/LinkDescriptor.h
===================================================================
--- source/ariba/overlay/LinkDescriptor.h	(revision 5914)
+++ source/ariba/overlay/LinkDescriptor.h	(revision 5916)
@@ -66,4 +66,11 @@
 	bool fromRemote;   ///< flag, whether this link was requested from remote
 	NodeID remoteNode; ///< remote end-point node
+	bool isVital() {
+		return up && keepAliveMissed == 0;
+	}
+	bool isDirectVital() {
+		return isVital() && communicationUp && !relayed;
+	}
+
 
 	// link identifiers --------------------------------------------------------
