Closed viniarck closed 2 years ago
To reproduce, you can send this request and check out kytos console:
❯ echo '{ "flows": [ { "match": { "dl_vlan": 10000 }, "actions": [ { "action_type": "output", "port": 2 } ] } ] }' | http POST http://localhost:8181/api/kytos/flow_manager/v2/flows/00:00
:00:00:00:00:00:01
HTTP/1.0 202 ACCEPTED
Access-Control-Allow-Origin: *
Content-Length: 37
Content-Type: application/json
Date: Thu, 19 May 2022 18:46:21 GMT
Server: Werkzeug/1.0.1 Python/3.9.12
{
"response": "FlowMod Messages Sent"
}
Hi Vinicius, the logging in hex format was actually a request from @jab1982 to be convenient for tshoot some physical devices (which show XID in hex format on their logs, so comparing the requests would be easier if Kytos also exports on hex format). From what I understood, we should actually modify pyof to allow __format__
calls. What do you thinkg? Another option would be use UBInt32.value
on the log call.
When I was migrationg flow_manager to MongoDB, I was exploring some OPFT_ERROR messages, and this crash showed up, the impact is high since it wont publish the message to listeners to properly handle it:
The root cause is a format that was being used at when trying to convert the
UBInt*
field type https://github.com/kytos-ng/of_core/blob/master/main.py#L344-L348