mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
61e2f2877d
This change updates the netlink message handling for the infra link on the POSIX platform to be more robust and efficient for `RTM_NEWLINK` and `RTM_DELLINK` messages. The logic for handling infra index changes is: 1. On `RTM_DELLINK`, the code verifies `ifinfo->ifi_index` is for the currently infra index `mInfraIfIndex`. 2. On `RTM_NEWLINK`, it identifies the infra by its name `if_indextoname(ifinfo->ifi_index)` and updates `mInfraIfIndex`.