From de5099fc2f0c0007d98ec33e8e6c82893e242521 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Tue, 18 Jun 2013 16:35:32 +0900 Subject: [PATCH] ofctl_v1_2.actions_to_str: ignore unknown instructions avoid crashing when the switch happens to have flows with non OFPInstructionActions instructions. Signed-off-by: YAMAMOTO Takashi Signed-off-by: FUJITA Tomonori --- ryu/lib/ofctl_v1_2.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ryu/lib/ofctl_v1_2.py b/ryu/lib/ofctl_v1_2.py index 0789bf68..d08bb21c 100644 --- a/ryu/lib/ofctl_v1_2.py +++ b/ryu/lib/ofctl_v1_2.py @@ -50,6 +50,9 @@ def actions_to_str(instructions): actions = [] for instruction in instructions: + if not isinstance(instruction, + ofproto_v1_2_parser.OFPInstructionActions): + continue for a in instruction.actions: action_type = a.cls_action_type