4 Commits

Author SHA1 Message Date
Isaku Yamahata
7e56bfb527 ofp_handler: Improve hello version negotiation
When switch sends version higher than Ryu supports, Ryu fails to negotiate.
In this case
  4 = OF1.3 from switch
  3 = OF1.2 from Ryu
  datapath.supported_ofp_version = (3 = OF1.2,)
In such cases, we should use OF1.2 instead of error.
> Connection to controller closed because of {"localhost",6633,0, {unsupported_version,4}}

Reported-by: Shivaram Mysore <shivaram.mysore@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-12-19 19:46:38 +09:00
FUJITA Tomonori
4152e5d229 Add workaround to switch_features_handler for OF1.3
hacky workaround, will be removed. OF1.3 doesn't have ports. An
application should not depend on them. But there might be such bad
applications so let's keep this workaround for while.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23 11:38:05 +09:00
Isaku Yamahata
b624e6369b ofp_handler: print msg.data in hex format, not raw string
Printing raw string causes terminal in unexpected mode.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-10-03 05:24:06 +09:00
FUJITA Tomonori
222d6f1fee register OFP handlers via register_instance
No reason that we use register_cls() for ofp handlers. We can do with
register_instance() with the others do.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-09-05 09:23:35 +09:00