Hi,

On Sun, 27 Jul 2014 08:00:18 +0900
Toshiki Tsuboi <t.tsubo2...@gmail.com> wrote:

> I have just found the bug for Ryu-bgp .
> Please let me share  a bug report  as follows

Thanks for that!

> (1) starting My sampleApp
>  -> neighbor create succeed
> 
>     $ sudo ./start_RyuBGPSpeaker.sh 
>     INFO 2014-07-20 19:07:29,012 base 207 API method core.start called with 
> args: {'router_id': '10.10.0.2', 'label_range': (100, 100000), 'waiter': 
> <ryu.lib.hub.Event object at     
>     0x7f8b8d8dba90>, 'local_as': 64512, 'bgp_server_port': 179, 
> 'refresh_max_eor_time': 0, 'refresh_stalepath_time': 0}
>     INFO 2014-07-20 19:07:29,059 base 207 API method neighbor.create called 
> with args: {'remote_as': 64511, 'ip_address': '192.168.100.100'}
>     INFO 2014-07-20 19:07:29,060 base 207 API method network.add called with 
> args: {'prefix': '10.20.0.0/24'}
>     INFO 2014-07-20 19:07:29,061 base 207 API method network.add called with 
> args: {'prefix': '10.30.0.0/24'}
>     INFO 2014-07-20 19:07:29,062 base 207 API method network.add called with 
> args: {'prefix': '10.40.0.0/16'}
>     INFO 2014-07-20 19:07:29,063 base 207 API method network.add called with 
> args: {'prefix': '10.50.0.0/16'}
>     CRITICAL 2014-07-20 19:07:30,096 peer 1759 Connection to peer: 
> 192.168.100.100 established
> 
> (2) neighbor reset through RPC in Ryu-cli
>   -> RPC ERROR has occurred 
> 
>     $ ./rpc_cli.py --peers=bgps=localhost:50002
>     (Cmd) request bgps core.reset_neighbor [{'ip_address': '192.168.100.100'}]
>     RPC ERROR 500.1 - global name 'BGP_ERROR_CEASE' is not defined 

How about the following (sorry, not tested)?
 
diff --git a/ryu/services/protocols/bgp/peer.py 
b/ryu/services/protocols/bgp/peer.py
index 4b3675a..03533d7 100644
--- a/ryu/services/protocols/bgp/peer.py
+++ b/ryu/services/protocols/bgp/peer.py
@@ -57,6 +57,10 @@ from ryu.lib.packet.bgp import BGP_MSG_UPDATE
 from ryu.lib.packet.bgp import BGP_MSG_KEEPALIVE
 from ryu.lib.packet.bgp import BGP_MSG_ROUTE_REFRESH
 
+from ryu.lib.packet.bgp import BGP_ERROR_CEASE
+from ryu.lib.packet.bgp import BGP_ERROR_SUB_ADMINISTRATIVE_SHUTDOWN
+from ryu.lib.packet.bgp import BGP_ERROR_SUB_CONNECTION_COLLISION_RESOLUTION
+
 from ryu.lib.packet.bgp import BGPPathAttributeNextHop
 from ryu.lib.packet.bgp import BGPPathAttributeAsPath
 from ryu.lib.packet.bgp import BGPPathAttributeLocalPref

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to