qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject [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.
Date Fri, 10 Nov 2017 15:14:59 GMT
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 <tross@redhat.com>
Authored: Fri Nov 10 10:09:54 2017 -0500
Committer: Ted Ross <tross@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


Mime
View raw message