From 7d446f3f795413cde1c93c29cebbaad87f1d03e2 Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Tue, 17 May 2016 11:00:08 +0900 Subject: [PATCH] Update default OpenFlow port to 6653 IANA has registered TCP port 6653 for OpenFlow, but 6633 was the de facto standard for a long while. So some applications might be using 6633 as the default. But now, Mininet has adopted port 6653 as the default, we migrate to port 6653 too. Signed-off-by: IWASE Yusuke Signed-off-by: FUJITA Tomonori --- ryu/controller/controller.py | 6 ++++-- ryu/ofproto/ofproto_common.py | 9 +++++---- ryu/tests/unit/ofproto/test_ofproto_common.py | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py index f1ba45cb..3bdf81fd 100644 --- a/ryu/controller/controller.py +++ b/ryu/controller/controller.py @@ -52,9 +52,11 @@ CONF = cfg.CONF CONF.register_cli_opts([ cfg.StrOpt('ofp-listen-host', default='', help='openflow listen host'), cfg.IntOpt('ofp-tcp-listen-port', default=ofproto_common.OFP_TCP_PORT, - help='openflow tcp listen port'), + help='openflow tcp listen port ' + '(default: %d)' % ofproto_common.OFP_TCP_PORT), cfg.IntOpt('ofp-ssl-listen-port', default=ofproto_common.OFP_SSL_PORT, - help='openflow ssl listen port'), + help='openflow ssl listen port ' + '(default: %d)' % ofproto_common.OFP_SSL_PORT), cfg.StrOpt('ctl-privkey', default=None, help='controller private key'), cfg.StrOpt('ctl-cert', default=None, help='controller certificate'), cfg.StrOpt('ca-certs', default=None, help='CA certificates') diff --git a/ryu/ofproto/ofproto_common.py b/ryu/ofproto/ofproto_common.py index 0d64b54f..fe2a55ad 100644 --- a/ryu/ofproto/ofproto_common.py +++ b/ryu/ofproto/ofproto_common.py @@ -21,10 +21,11 @@ OFP_HEADER_PACK_STR = '!BBHI' OFP_HEADER_SIZE = 8 assert calcsize(OFP_HEADER_PACK_STR) == OFP_HEADER_SIZE -# note: while IANA assigned port number for OpenFlow is 6653, -# 6633 is (still) the defacto standard. -OFP_TCP_PORT = 6633 -OFP_SSL_PORT = 6633 +# Note: IANA assigned port number for OpenFlow is 6653 +# from OpenFlow 1.3.3 (EXT-133). +# Some applications may still use 6633 as the de facto standard though. +OFP_TCP_PORT = 6653 +OFP_SSL_PORT = 6653 # Vendor/Experimenter IDs # https://rs.opennetworking.org/wiki/display/PUBLIC/ONF+Registry diff --git a/ryu/tests/unit/ofproto/test_ofproto_common.py b/ryu/tests/unit/ofproto/test_ofproto_common.py index f9af4f5a..6a63236e 100644 --- a/ryu/tests/unit/ofproto/test_ofproto_common.py +++ b/ryu/tests/unit/ofproto/test_ofproto_common.py @@ -33,5 +33,5 @@ class TestOfprotCommon(unittest.TestCase): eq_(OFP_HEADER_SIZE, 8) def test_define_constants(self): - eq_(OFP_TCP_PORT, 6633) - eq_(OFP_SSL_PORT, 6633) + eq_(OFP_TCP_PORT, 6653) + eq_(OFP_SSL_PORT, 6653)