[OPNFLWPLUG-886] opendaylight-direct-statistics:get-flow-statistics gets BADMATCH/BADLEN error Created: 27/Apr/17  Updated: 27/Sep/21  Resolved: 08/May/17

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
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: 8319

 Description   

opendaylight-direct-statistics:get-flow-statistics RPC always returns BADMATCH/BADLEN error if match field is missing in its input.

POST /restconf/operations/opendaylight-direct-statistics:get-flow-statistics
Body:
{
"input":

{ "node": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id=\"openflow:1\"]" }

}

Result:
{
"errors": {
"error": [

{ "error-type": "application", "error-tag": "operation-failed", "error-message": "Device reported error type BADMATCH code BADLEN" "error-info": "org.opendaylight.openflowjava.protocol.api.connection.DeviceRequestFailedException: Device-side failure..." }

]
}
}

I captured secure channel, then I observed that above RPC call sent a malformed MULTIPART_REQUEST (OFPMP_FLOW) message.

0x0000: 000c 297f 0c59 0050 56e1 e5c2 0800 4500 ..)..Y.PV.....E.
0x0010: 0058 7eba 0000 8006 b6d7 0a3a c443 ac10 .X~........:.C..
0x0020: 8a80 19e9 9a99 2986 4bdc d7cb 9aca 5018 ......).K.....P.
0x0030: faf0 f8ad 0000 0412 0030 0000 1730 0001 .........0...0..
0x0040: 0000 0000 0000 ff00 0000 ffff ffff ffff ................
0x0050: ffff 0000 0000 0000 0000 0000 0000 0000 ................
0x0060: 0000 0000 0000 ......

"match" field is missing in ofp_flow_stats_request.

table_id
ff
pad[3]
00 0000
out_port
ffff ffff
out_group
ffff ................
0x0050: ffff
pad2[4]
0000 0000
cookie
0000 0000 0000 0000
cookie_mask
0000 ................
0x0060: 0000 0000 0000 ......

This issue should be fixed the following patch.

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



 Comments   
Comment by Shigeru Yasuda [ 08/May/17 ]

https://git.opendaylight.org/gerrit/56183 (stable/carbon)

Generated at Wed Feb 07 20:33:38 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.