diff options
author | YAMAMOTO Takashi <yamamoto@valinux.co.jp> | 2013-06-18 16:35:32 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-06-20 07:51:02 +0900 |
commit | de5099fc2f0c0007d98ec33e8e6c82893e242521 (patch) | |
tree | 16eec74ef9ae0b3d1d8a7d8b96b3ab01a58f94ff | |
parent | 2214fae1785d7623150381ea5bfb9ba7bb3a5433 (diff) |
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 <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/lib/ofctl_v1_2.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 |