This patch fixes incorrect conversion of De Morgan's laws.
  e.g.) not (A and B) == not A or not B

Original:
    if not (vpn_path.source is None
            and route_dist == vrf_table.vrf_conf.route_dist):

Incorrect:
    if (vpn_path.source is not None and  # !!! Should be "or"
            route_dist != vrf_table.vrf_conf.route_dist):

Correct:
    if (vpn_path.source is not None or
            route_dist != vrf_table.vrf_conf.route_dist):

Signed-off-by: IWASE Yusuke <[email protected]>
---
 ryu/services/protocols/bgp/core_managers/table_manager.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ryu/services/protocols/bgp/core_managers/table_manager.py 
b/ryu/services/protocols/bgp/core_managers/table_manager.py
index 4b95853..aaa67cb 100644
--- a/ryu/services/protocols/bgp/core_managers/table_manager.py
+++ b/ryu/services/protocols/bgp/core_managers/table_manager.py
@@ -470,7 +470,7 @@ class TableCoreManager(object):
             # of the given path and import this path into them.
             route_dist = vpn_path.nlri.route_dist
             for vrf_table in interested_tables:
-                if (vpn_path.source is not None and
+                if (vpn_path.source is not None or
                         route_dist != vrf_table.vrf_conf.route_dist):
                     update_vrf_dest = vrf_table.import_vpn_path(vpn_path)
                     # Queue the destination for further processing.
-- 
2.7.4


------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to