Signed-off-by: WATANABE Fumitaka <[email protected]>
---
 ryu/lib/ofctl_v1_0.py |    7 ++++++-
 ryu/lib/ofctl_v1_2.py |    5 ++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ryu/lib/ofctl_v1_0.py b/ryu/lib/ofctl_v1_0.py
index e68d53e..0fd958c 100644
--- a/ryu/lib/ofctl_v1_0.py
+++ b/ryu/lib/ofctl_v1_0.py
@@ -33,7 +33,12 @@ def to_actions(dp, acts):
         action_type = a.get('type')
         if action_type == 'OUTPUT':
             out_port = int(a.get('port', ofproto_v1_0.OFPP_NONE))
-            actions.append(dp.ofproto_parser.OFPActionOutput(out_port))
+            if out_port == dp.ofproto.OFPP_CONTROLLER:
+                miss_send_len = ofproto_v1_0.OFP_DEFAULT_MISS_SEND_LEN
+                actions.append(dp.ofproto_parser.OFPActionOutput(
+                    out_port, max_len=miss_send_len))
+            else:
+                actions.append(dp.ofproto_parser.OFPActionOutput(out_port))
         elif action_type == 'SET_VLAN_VID':
             vlan_vid = int(a.get('vlan_vid', 0xffff))
             actions.append(dp.ofproto_parser.OFPActionVlanVid(vlan_vid))
diff --git a/ryu/lib/ofctl_v1_2.py b/ryu/lib/ofctl_v1_2.py
index 517b36a..5237cf7 100644
--- a/ryu/lib/ofctl_v1_2.py
+++ b/ryu/lib/ofctl_v1_2.py
@@ -36,7 +36,10 @@ def to_actions(dp, acts):
         action_type = a.get('type')
         if action_type == 'OUTPUT':
             out_port = int(a.get('port', ofproto_v1_2.OFPP_ANY))
-            actions = [dp.ofproto_parser.OFPActionOutput(out_port, 0)]
+            miss_send_len = (128 if out_port == dp.ofproto.OFPP_CONTROLLER
+                             else 0)
+            actions = [dp.ofproto_parser.OFPActionOutput(
+                       out_port, max_len=miss_send_len)]
             inst_type = dp.ofproto.OFPIT_APPLY_ACTIONS
             inst = [dp.ofproto_parser.OFPInstructionActions(
                     inst_type, actions)]
-- 1.7.10.4


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to