bgp: fix bug of receiving 'RouteRefresh' Message
When Ryu BGP received 'RouteRefresh' Message from the peering router, BGP session has closed as follows . DEBUG 2014-08-15 02:20:08,718 speaker 447 Received msg from ('192.168.100.100', '34939') << BGPRouteRefresh(afi=1,demarcation=1,len=23,safi=128,type=5) DEBUG 2014-08-15 02:20:08,719 speaker 566 Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/speaker.py", line 560, in _recv_loop self.data_received(next_bytes) File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/speaker.py", line 275, in data_received self._data_received(next_bytes) File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/speaker.py", line 355, in _data_received self._handle_msg(msg) File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/speaker.py", line 508, in _handle_msg self._peer.handle_msg(msg) File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/peer.py", line 1585, in handle_msg self._handle_route_refresh_msg(msg) File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/peer.py", line 1619, in _handle_route_refresh_msg afi = msg.route_family.afi AttributeError: 'BGPRouteRefresh' object has no attribute 'route_family' INFO 2014-08-15 02:20:08,722 peer 1901 Connection to peer 192.168.100.100 lost, reason: 'BGPRouteRefresh' object has no attribute 'route_family' Resetting retry connect loop: False Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
a60c18207e
commit
1f90cddd20
@ -1616,8 +1616,8 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
|
||||
LOG.debug('Refresh Stale Path timer set (%s sec).' % rst)
|
||||
|
||||
def _handle_route_refresh_msg(self, msg):
|
||||
afi = msg.route_family.afi
|
||||
safi = msg.route_family.safi
|
||||
afi = msg.afi
|
||||
safi = msg.safi
|
||||
demarcation = msg.demarcation
|
||||
|
||||
# If this normal route-refresh request.
|
||||
|
Loading…
Reference in New Issue
Block a user