Atanu Ghosh wrote:
Hi,

Thanks for finding the problem.

A fix is now in CVS using two timers.

Thanks, this does seem to fix the problem. I'm also attaching a patch that adds more trace messages, which might be useful for future debugging, just in case you want to apply them.

Thanks,
Ben

--
Ben Greear <[EMAIL PROTECTED]> Candela Technologies Inc http://www.candelatech.com


Index: area_router.cc
===================================================================
RCS file: /cvs/xorp/ospf/area_router.cc,v
retrieving revision 1.286
diff -u -r1.286 area_router.cc
--- area_router.cc	19 Oct 2007 02:43:06 -0000	1.286
+++ area_router.cc	23 Oct 2007 15:33:49 -0000
@@ -1512,7 +1512,7 @@
     if (!external_area_type())
 	return;
 
-    push_lsas();
+    push_lsas("external_announce_complete");
 }
 
 template <typename A>
@@ -1547,7 +1547,7 @@
     bool multicast_on_peer;
     publish(OspfTypes::ALLPEERS, OspfTypes::ALLNEIGHBOURS, lsar,
 	    multicast_on_peer);
-    push_lsas();
+    push_lsas("external_refresh");
 }
 
 template <typename A>
@@ -2589,7 +2589,7 @@
     }
 
  out:
-    push_lsas();
+    push_lsas("receive_lsas");
     external_push_all_areas();
     routing_end();
 }
@@ -3497,18 +3497,18 @@
     publish(OspfTypes::ALLPEERS, OspfTypes::ALLNEIGHBOURS, lsar,
 	    multicast_on_peer);
 
-    push_lsas();	// NOTE: a push after every LSA.
+    push_lsas("publish_all");	// NOTE: a push after every LSA.
 }
 
 template <typename A>
 void
-AreaRouter<A>::push_lsas()
+AreaRouter<A>::push_lsas(const char* msg)
 {
     typename PeerMap::iterator i;
     for(i = _peers.begin(); i != _peers.end(); i++) {
 	PeerStateRef temp_psr = i->second;
 	if (temp_psr->_up) {
-	    if (!_ospf.get_peer_manager().push_lsas(i->first))
+	    if (!_ospf.get_peer_manager().push_lsas(i->first, msg))
 		XLOG_FATAL("Unable to push LSAs");
 	}
     }
Index: area_router.hh
===================================================================
RCS file: /cvs/xorp/ospf/area_router.hh,v
retrieving revision 1.137
diff -u -r1.137 area_router.hh
--- area_router.hh	17 Oct 2007 16:08:46 -0000	1.137
+++ area_router.hh	23 Oct 2007 15:33:49 -0000
@@ -1061,7 +1061,7 @@
     /**
      * Send (push) any queued LSAs.
      */
-    void push_lsas();
+    void push_lsas(const char* msg);
 
     /**
      * Return the setting of the propagate bit in a Type-7-LSA.
Index: peer.cc
===================================================================
RCS file: /cvs/xorp/ospf/peer.cc,v
retrieving revision 1.300
diff -u -r1.300 peer.cc
--- peer.cc	23 Oct 2007 08:59:54 -0000	1.300
+++ peer.cc	23 Oct 2007 15:33:54 -0000
@@ -417,12 +417,12 @@
 
 template <typename A>
 bool
-PeerOut<A>::push_lsas()
+PeerOut<A>::push_lsas(const char* message)
 {
     typename map<OspfTypes::AreaID, Peer<A> *>::iterator i;
 
     for(i = _areas.begin(); i != _areas.end(); i++) {
-	if (!(*i).second->push_lsas())
+	if (!(*i).second->push_lsas(message))
 	    return false;
     }
 
@@ -1251,11 +1251,11 @@
 
 template <typename A>
 bool
-Peer<A>::push_lsas()
+Peer<A>::push_lsas(const char* message)
 {
     typename list<Neighbour<A> *>::iterator n;
     for(n = _neighbours.begin(); n != _neighbours.end(); n++)
-	if (!(*n)->push_lsas())
+	if (!(*n)->push_lsas(message))
 	    return false;
 
     return true;
@@ -3604,6 +3604,12 @@
 			       bool immediate, 
 			       const char *comment)
 {
+    XLOG_TRACE(_ospf.trace()._neighbour_events, 
+	       "start_rxmt_timer: %p %s Neighbour: %s  State: %s  %s\n", this,
+	       _peer.get_if_name().c_str(),
+	       pr_id(get_candidate_id()).c_str(),
+	       pp_state(get_state()).c_str(),
+	       comment);
     debug_msg("start_rxmt_timer: %p %s %s\n", this, 
 	      _peer.get_if_name().c_str(),
 	      comment);
@@ -3630,6 +3636,13 @@
 void
 Neighbour<A>::stop_rxmt_timer(uint32_t index, const char *comment)
 {
+    XLOG_TRACE(_ospf.trace()._neighbour_events, 
+	       "stop_rxmt_timer: %p %s index: %i Neighbour: %s  State: %s  %s\n", this,
+	       _peer.get_if_name().c_str(), (int)(index),
+	       pr_id(get_candidate_id()).c_str(),
+	       pp_state(get_state()).c_str(),
+	       comment);
+
     debug_msg("stop_rxmt_timer: %p %s %s\n", this,
 	      _peer.get_if_name().c_str(), comment);
     XLOG_ASSERT(index < TIMERS);
@@ -3644,14 +3657,14 @@
 
 template <typename A>
 void
-Neighbour<A>::restart_retransmitter()
+Neighbour<A>::restart_retransmitter(const char* message)
 {
     if (_rxmt_wrapper[FULL])
-	stop_rxmt_timer(FULL, "restart retransmitter");
+	stop_rxmt_timer(FULL, message);
 
     start_rxmt_timer(FULL, callback(this, &Neighbour<A>::retransmitter),
 		     false,
-		     "restart retransmitter");
+		     message);
 }
 
 // template <typename A>
@@ -3668,6 +3681,14 @@
     // When there is nothing left to retransmit stop the timer 
     bool more = false;
 
+    XLOG_TRACE(_ospf.trace()._neighbour_events, 
+	       "retransmitter, ls_req_list.size(): %i  lsa_rxmit.size(): %i Interface(%s) Neighbour(%s) State(%s)",
+	       (int)(_ls_request_list.size()),
+	       (int)(_lsa_rxmt.size()),
+	       _peer.get_if_name().c_str(),
+	       pr_id(get_candidate_id()).c_str(),
+	       pp_state(get_state()).c_str());
+
     if (!_ls_request_list.empty()) {
 
 	LinkStateRequestPacket lsrp(_ospf.get_version());
@@ -3798,6 +3819,12 @@
 bool
 Neighbour<A>::send_data_description_packet()
 {
+    XLOG_TRACE(_ospf.trace()._neighbour_events, 
+	       "send_data_description_packet, Interface(%s) Neighbour(%s) State(%s)",
+	       _peer.get_if_name().c_str(),
+	       pr_id(get_candidate_id()).c_str(),
+	       pp_state(get_state()).c_str());
+
     _peer.populate_common_header(_data_description_packet);
     switch(get_linktype()) {
     case OspfTypes::PointToPoint:
@@ -3855,6 +3882,14 @@
 {
     XLOG_ASSERT(ExStart == get_state());
 
+    XLOG_TRACE(_ospf.trace()._neighbour_events, 
+	       "start_sending_data_description_packets, Event(%s) Interface(%s) Neighbour(%s) "
+	       "State(%s)",
+	       event_name,
+	       _peer.get_if_name().c_str(),
+	       pr_id(get_candidate_id()).c_str(),
+	       pp_state(get_state()).c_str());
+
     // Clear out the request list.
     _ls_request_list.clear();
 
@@ -4958,8 +5003,9 @@
 
 template <typename A>
 bool
-Neighbour<A>::push_lsas()
+Neighbour<A>::push_lsas(const char* message)
 {
+
     // Typically push_lsas will be called immediately after one or
     // more calls to queue_lsa, it therefore shouldn't be possible for
     // the state to change. If the state was less than exchange then
@@ -4999,7 +5045,7 @@
     // sending. Zap the queue.
     _lsa_queue.clear();
 
-    restart_retransmitter();
+    restart_retransmitter(message);
 
     return true;
 }
@@ -5172,7 +5218,7 @@
 	    event_loading_done();
 	    return;
 	}
-	restart_retransmitter();
+	restart_retransmitter("event_exchange_done, state Exchange");
 	debug_msg("link state request list count: %d\n",
 		  XORP_INT_CAST(_ls_request_list.size()));
 	break;
Index: peer.hh
===================================================================
RCS file: /cvs/xorp/ospf/peer.hh,v
retrieving revision 1.147
diff -u -r1.147 peer.hh
--- peer.hh	23 Oct 2007 08:59:55 -0000	1.147
+++ peer.hh	23 Oct 2007 15:33:57 -0000
@@ -229,7 +229,7 @@
     /**
      * Send (push) any queued LSAs.
      */
-    bool push_lsas();
+    bool push_lsas(const char* message);
 
     /**
      * Are any of the neighbours of this peer in the state exchange or
@@ -784,7 +784,7 @@
     /**
      * Send (push) any queued LSAs.
      */
-    bool push_lsas();
+    bool push_lsas(const char* message);
 
     /*
      * Should we be computing the DR and BDR on this peer?
@@ -1592,7 +1592,7 @@
     /**
      * Send (push) any queued LSAs.
      */
-    bool push_lsas();
+    bool push_lsas(const char* message);
 
     /**
      * Is this LSA on this neighbours link state request list.
@@ -1741,7 +1741,7 @@
     /**
      * restart transmitter.
      */
-    void restart_retransmitter();
+    void restart_retransmitter(const char* comment);
 
     /**
      * Stop the transmitter.
Index: peer_manager.cc
===================================================================
RCS file: /cvs/xorp/ospf/peer_manager.cc,v
retrieving revision 1.146
diff -u -r1.146 peer_manager.cc
--- peer_manager.cc	3 Oct 2007 21:23:53 -0000	1.146
+++ peer_manager.cc	23 Oct 2007 15:33:58 -0000
@@ -937,14 +937,14 @@
 
 template <typename A>
 bool
-PeerManager<A>::push_lsas(const OspfTypes::PeerID peerid)
+PeerManager<A>::push_lsas(const OspfTypes::PeerID peerid, const char* msg)
 {
     if (0 == _peers.count(peerid)) {
 	XLOG_ERROR("Unknown PeerID %u", peerid);
 	return false;
     }
 
-    return _peers[peerid]->push_lsas();    
+    return _peers[peerid]->push_lsas(msg);
 }
 
 template <typename A>
Index: peer_manager.hh
===================================================================
RCS file: /cvs/xorp/ospf/peer_manager.hh,v
retrieving revision 1.94
diff -u -r1.94 peer_manager.hh
--- peer_manager.hh	3 Oct 2007 21:23:53 -0000	1.94
+++ peer_manager.hh	23 Oct 2007 15:33:58 -0000
@@ -297,7 +297,7 @@
     /**
      * Send (push) any queued LSAs.
      */
-    bool push_lsas(const OspfTypes::PeerID peerid);
+    bool push_lsas(const OspfTypes::PeerID peerid, const char* msg);
 
     /**
      * Get the interface ID of this peer OSPFv3 only.
_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

Reply via email to