fix some leftover of commit 9d5e66fa4e49ce66103dbc9640a33bd9c22fab3f.
("bgp: use ryu bgp packet library instead of original one")

Tested-by: Itsuro ODA <[email protected]>
Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
 ryu/services/protocols/bgp/processor.py | 6 +++---
 ryu/services/protocols/bgp/speaker.py   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ryu/services/protocols/bgp/processor.py 
b/ryu/services/protocols/bgp/processor.py
index 05b766a..4180610 100644
--- a/ryu/services/protocols/bgp/processor.py
+++ b/ryu/services/protocols/bgp/processor.py
@@ -466,7 +466,7 @@ def _cmp_by_router_id(local_asn, path1, path2):
         if path_source is None:
             return local_bgp_id
         else:
-            return path_source.protocol.recv_open.bgpid
+            return path_source.protocol.recv_open.bgp_identifier
 
     path_source1 = path1.source
     path_source2 = path2.source
@@ -492,9 +492,9 @@ def _cmp_by_router_id(local_asn, path1, path2):
 
     # At least one path is not coming from NC, so we get local bgp id.
     if path_source1 is not None:
-        local_bgp_id = path_source1.protocol.sent_open_msg.bgpid
+        local_bgp_id = path_source1.protocol.sent_open_msg.bgp_identifier
     else:
-        local_bgp_id = path_source2.protocol.sent_open_msg.bgpid
+        local_bgp_id = path_source2.protocol.sent_open_msg.bgp_identifier
 
     # Get router ids.
     router_id1 = get_router_id(path_source1, local_bgp_id)
diff --git a/ryu/services/protocols/bgp/speaker.py 
b/ryu/services/protocols/bgp/speaker.py
index 7b98aa2..a691b12 100644
--- a/ryu/services/protocols/bgp/speaker.py
+++ b/ryu/services/protocols/bgp/speaker.py
@@ -163,8 +163,8 @@ class BgpProtocol(Protocol, Activity):
         if not self.state == BGP_FSM_OPEN_CONFIRM:
             raise BgpProtocolException(desc='Can access remote router id only'
                                             ' after open message is received')
-        remote_id = self.recv_open_msg.bgpid
-        local_id = self.sent_open_msg.bgpid
+        remote_id = self.recv_open_msg.bgp_identifier
+        local_id = self.sent_open_msg.bgp_identifier
         return from_inet_ptoi(local_id) > from_inet_ptoi(remote_id)
 
     def is_enhanced_rr_cap_valid(self):
-- 
1.8.3.1


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to