[CONTROLLER-1021] MD-SAL FRM may update/remove unexpected flow entries. Created: 12/Nov/14  Updated: 19/Oct/17  Resolved: 05/May/15

Status: Resolved
Project: controller
Component/s: adsal
Affects Version/s: Post-Helium
Fix Version/s: None

Type: Bug
Reporter: Shigeru Yasuda Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 2368

 Description   

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": [

{ "hard-timeout": 0, "id": "drop-all", "idle-timeout": 0, "priority": 10, "table_id": 0 }

]
}

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":

{ "type": "0x8100" }

}
},
"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":

{ "type": "0x86dd" }

}
},
"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

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.

DELETE http://localhost:8181/restconf/config/opendaylight-inventory:nodes/opendaylight-inventory:node/openflow:1/flow-node-inventory:table/0/flow-node-inventory:flow/drop-all

mininet> dpctl dump-flows -O openflow13

      • s1 ------------------------------------------------------------------------
        OFPST_FLOW reply (OF1.3) (xid=0x2):

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.



 Comments   
Comment by Shigeru Yasuda [ 12/Nov/14 ]

https://git.opendaylight.org/gerrit/12787 (master)

Comment by Anil Vishnoi [ 12/Nov/14 ]

Hi Shigeru,

I updated the gerrit with my comment, can you please have a look at it and let me know your thought.

Thanks
Anil

Comment by Shigeru Yasuda [ 13/Nov/14 ]

Hi Anil, Thanks for your comment.

(In reply to avishnoi from comment #2)
> I updated the gerrit with my comment, can you please have a look at it and
> let me know your thought.

As I commented to gerrit:2368, I believe that FRM should always use strict
version of FLOW_MOD because FRM should update/delete flow entries only associated
with updated/deleted flow records in datastore.

Comment by Shigeru Yasuda [ 18/Nov/14 ]

https://git.opendaylight.org/gerrit/12905 (stable/helium)

Comment by Carol Sanders [ 05/May/15 ]

This bug is part of the project to Move all ADSAL associated component bugs to ADSAL.

Generated at Wed Feb 07 19:54:29 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.