Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

Commit ce96f79

Browse files
authored
Merge pull request #494 from renanrodrigo/fix_flowmod_defaults
Fix FlowMod defaults for OF 1.0
2 parents edb84db + 8909e2c commit ce96f79

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pyof/v0x01/controller2switch/flow_mod.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class FlowMod(GenericMessage):
6464
def __init__(self, xid=None, match=None, cookie=0, command=None,
6565
idle_timeout=0, hard_timeout=0, priority=0,
6666
buffer_id=NO_BUFFER, out_port=Port.OFPP_NONE,
67-
flags=FlowModFlags.OFPFF_CHECK_OVERLAP, actions=None):
67+
flags=FlowModFlags.OFPFF_SEND_FLOW_REM, actions=None):
6868
"""Create a FlowMod with the optional parameters below.
6969
7070
Args:
@@ -89,7 +89,7 @@ def __init__(self, xid=None, match=None, cookie=0, command=None,
8989
header.
9090
"""
9191
super().__init__(xid)
92-
self.match = match
92+
self.match = match or Match()
9393
self.cookie = cookie
9494
self.command = command
9595
self.idle_timeout = idle_timeout
@@ -98,4 +98,4 @@ def __init__(self, xid=None, match=None, cookie=0, command=None,
9898
self.buffer_id = buffer_id
9999
self.out_port = out_port
100100
self.flags = flags
101-
self.actions = [] if actions is None else actions
101+
self.actions = actions or []

0 commit comments

Comments
 (0)