diff options
author | YAMAMOTO Takashi <yamamoto@valinux.co.jp> | 2014-06-20 15:52:00 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-06-22 12:32:39 +0900 |
commit | 2814715ef998c92084386e5cb5191f32149b32f3 (patch) | |
tree | aab6e416d96d15a92a37ea89d770dd6ec11daca4 | |
parent | 254ae732de71dc5d7a46bd168a3bd22bc7b6919b (diff) |
bgp: fix some leftover of transition to packet lib bgp
fix some leftover of commit 9d5e66fa4e49ce66103dbc9640a33bd9c22fab3f.
("bgp: use ryu bgp packet library instead of original one")
Tested-by: Itsuro ODA <oda@valinux.co.jp>
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/services/protocols/bgp/processor.py | 6 | ||||
-rw-r--r-- | 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 05b766a0..4180610d 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 7b98aa2f..a691b12a 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): |