mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 22:06:10 +02:00
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>
This commit is contained in:
parent
254ae732de
commit
2814715ef9
@ -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)
|
||||
|
||||
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user