On Wed, 13 Feb 2013 08:14:48 +0900
Isaku Yamahata <[email protected]> wrote:

> On Sat, Feb 09, 2013 at 01:46:00PM +0900, FUJITA Tomonori wrote:
>> > diff --git a/ryu/controller/ofp_handler.py b/ryu/controller/ofp_handler.py
>> > index add0301..05ac79b 100644
>> > --- a/ryu/controller/ofp_handler.py
>> > +++ b/ryu/controller/ofp_handler.py
>> > @@ -44,7 +44,7 @@ class OFPHandler(app_manager.RyuApp):
>> >          super(OFPHandler, self).__init__(*args, **kwargs)
>> >  
>> >      @staticmethod
>> > -    def hello_failed(datapath, error_desc):
>> > +    def _hello_failed(datapath, error_desc):
>> >          LOG.error(error_desc)
>> >          error_msg = datapath.ofproto_parser.OFPErrorMsg(datapath)
>> >          error_msg.type = datapath.ofproto.OFPET_HELLO_FAILED
>> > @@ -62,13 +62,63 @@ class OFPHandler(app_manager.RyuApp):
>> >          # pre 1.0 is not supported
>> >          elements = getattr(msg, 'elements', None)
>> >          if elements:
>> > -            usable_versions = []
>> > +            switch_versions = []
>> >              for elem in elements:
>> > -                usable_versions += elem.versions or []
>> > +                switch_versions += elem.versions or []
>> > +            switch_versions = sorted(set(switch_versions))
>> 
>> For what the above is necessary?
> 
> We can go without the line because it doesn't affect correctness.
> I afraid that switch versions can contain duplicated versions.

Hmm, I can't read the spec in a way that duplicated versions can be in
the bitmaps field.


> I'll respin without sorted(set()) if you prefer.

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to