mirror of
https://github.com/espressif/openthread.git
synced 2026-07-10 14:20:29 +00:00
ce7fad1c01
This commit fixes `get_srp_server_port()` in `thread-cert/node.py`. This function parses Network Data service entries, searching for an SRP/DNS unicast (non-preferred) entry, and then attempts to parse the published port number of the SRP server by examining the last bytes of the "server data". The SRP/DNS unicast entry was previously updated to optionally include a "version" field at the end of the "server data". This update caused the port number parsing to fail, as the code did not account for the extra byte corresponding to the version field. This commit resolves this issue by ensuring that the two bytes are correctly read and interpreted as the port number, regardless of the presence of the version field.