-
Bug
-
Resolution: Done
-
None
-
Post-Helium
-
None
-
Operating System: All
Platform: All
-
2368
MD-SAL forwarding rules manager does not set strict flag to
UpdateFlowInput/RemoveFlowInput when it calls update-flow/remove-flow RPC.
So openflowplugin will send non-strict version of FLOW_MOD (MODIFY/DELETE) to
OF switch. This may break unexpected flow entries.
How to reproduce:
1. Install "drop-all" flow entry that drops every packet.
PUT
http://localhost:8181/restconf/config/opendaylight-inventory:nodes/opendaylight-inventory:node/openflow:1/flow-node-inventory:table/0/flow-node-inventory:flow/drop-all
{
"flow-node-inventory:flow": [
]
}
2. Install 2 more flow entries, "drop-vlan" and "drop-ipv6", with specifying
ethernet-match.
PUT http://localhost:8181/restconf/config/opendaylight-inventory:nodes/opendaylight-inventory:node/openflow:1/flow-node-inventory:table/0/flow-node-inventory:flow/drop-vlan
{
"flow-node-inventory:flow": [
{
"table_id": 0,
"idle-timeout": 0,
"priority": 30,
"hard-timeout": 0,
"match": {
"ethernet-match": {
"ethernet-type":
}
},
"id": "drop-vlan"
}
]
}
PUT http://localhost:8181/restconf/config/opendaylight-inventory:nodes/opendaylight-inventory:node/openflow:1/flow-node-inventory:table/0/flow-node-inventory:flow/drop-ipv6
{
"flow-node-inventory:flow": [
{
"hard-timeout": 0,
"id": "drop-ipv6",
"idle-timeout": 0,
"match": {
"ethernet-match": {
"ethernet-type":
}
},
"priority": 40,
"table_id": 0
}
]
}
mininet> dpctl dump-flows -O openflow13
-
-
- s1 ------------------------------------------------------------------------
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=48.180s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=40,ipv6 actions=drop
cookie=0x0, duration=205.369s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=30,dl_type=0x8100 actions=drop
cookie=0x0, duration=325.145s, table=0, n_packets=130, n_bytes=8190, send_flow_rem priority=10 actions=drop
- s1 ------------------------------------------------------------------------
-
3. Delete "drop-all". This will remove all flow entries in s1 unexpectedly
because openflowplugin sends non-strict version of FLOW_MOD (DELETE) that
matches every flow entry.
mininet> dpctl dump-flows -O openflow13
-
-
- s1 ------------------------------------------------------------------------
OFPST_FLOW reply (OF1.3) (xid=0x2):
- s1 ------------------------------------------------------------------------
-
FRM should always set strict flag into UpdateFlowInput/RemoveFlowInput so that
openflowplugin sends strict version of FLOW_MOD (MODIFY_STRICT/DELETE_STRICT).
If openflowplugin sends FLOW_MOD (DELETE_STRICT), DELETE request described above
deletes only "drop-all" flow entry.