Skip to content

interface: retry extdev claim on ifindex update#78

Open
dm1trys wants to merge 1 commit into
openwrt:masterfrom
dm1trys:extdev-ifindex-retry
Open

interface: retry extdev claim on ifindex update#78
dm1trys wants to merge 1 commit into
openwrt:masterfrom
dm1trys:extdev-ifindex-retry

Conversation

@dm1trys
Copy link
Copy Markdown

@dm1trys dm1trys commented Apr 28, 2026

Summary

Retry autostart setup for external devices once a valid ifindex
appears, and avoid treating the transient external/no-ifindex
claim failure as terminal.

Problem

External devices can briefly exist without a resolvable ifindex.
If an autostart interface tries to claim such a device, netifd
can report DEVICE_CLAIM_FAILED and leave the interface down even
after the device later receives a valid ifindex.

Fix

  • suppress terminal DEVICE_CLAIM_FAILED for the transient
    external-device/no-ifindex case
  • retry interface setup on DEV_EVENT_UPDATE_IFINDEX

Notes

This keeps genuine claim failures unchanged while fixing
recreated external devices such as tunnel interfaces.

External devices can briefly exist without a resolvable ifindex.
If an autostart interface tries to claim such a device, the
claim currently fails with DEVICE_CLAIM_FAILED and the
interface may stay down even after the device later receives
a valid ifindex.

Treat this specific external/no-ifindex claim failure as
transient and retry interface setup when the device emits
DEV_EVENT_UPDATE_IFINDEX.

This keeps genuine claim failures unchanged while fixing
recreated external devices such as tunnel interfaces.

Signed-off-by: Dmitry Slavgorodskiy <7873029+dm1trys@users.noreply.github.com>
@dm1trys dm1trys marked this pull request as ready for review April 28, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant