You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2017/11/10 15:14:59 UTC

[2/2] qpid-dispatch git commit: DISPATCH-873 - Remove next-hop when new route to a node is via a neighbor link. Hat tip to Mick Goulish for identifying the root cause of this bug.

DISPATCH-873 - Remove next-hop when new route to a node is via a neighbor link.
Hat tip to Mick Goulish for identifying the root cause of this bug.


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/6ccbebb2
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/6ccbebb2
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/6ccbebb2

Branch: refs/heads/1.0.x
Commit: 6ccbebb23635a6a61e56d5c2698aec2b39ab3055
Parents: 21fcf98
Author: Ted Ross <tr...@redhat.com>
Authored: Fri Nov 10 10:09:54 2017 -0500
Committer: Ted Ross <tr...@redhat.com>
Committed: Fri Nov 10 10:11:29 2017 -0500

----------------------------------------------------------------------
 python/qpid_dispatch_internal/router/node.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6ccbebb2/python/qpid_dispatch_internal/router/node.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/router/node.py b/python/qpid_dispatch_internal/router/node.py
index 88d820f..d5a2353 100644
--- a/python/qpid_dispatch_internal/router/node.py
+++ b/python/qpid_dispatch_internal/router/node.py
@@ -437,7 +437,7 @@ class RouterNode(object):
         self.next_hop_router = None
         self.adapter.set_link(self.maskbit, link_id)
         self.adapter.remove_next_hop(self.maskbit)
-        self.log(LOG_TRACE, "Node %s link set: link_id=%r" % (self.id, link_id))
+        self.log(LOG_TRACE, "Node %s link set: link_id=%r (removed next hop)" % (self.id, link_id))
         return True
 
 
@@ -458,6 +458,11 @@ class RouterNode(object):
 
     def set_next_hop(self, next_hop):
         if self.id == next_hop.id:
+            ##
+            ## If the next hop is self (destination is a neighbor) and there
+            ## was a next hop in place, explicitly remove the next hop (DISPATCH-873).
+            ##
+            self.remove_next_hop()
             return
         if self.next_hop_router and self.next_hop_router.id == next_hop.id:
             return


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org