openwrt / openwrt/netifd

hotplugd - add IFEV_LINK_UP event

Open
#63 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
37
Forks
62
PR merge metrics
No merged PRs in 30d

Description

I am currently using a custom script to try out MAC pinning on a single port.
For this I have to modify the FDB of the switch.

But - every time the link gets down, the fdb table for this interface is flushed.
There is no hotplugd event when the interface gets back up again, so I have to manually run the script - or write another script for a periodic check.

That's where I found out that there is no hotplugd event for this case.
https://git.openwrt.org/?p=project/netifd.git;a=blob;f=interface-event.c;hb=HEAD#l132

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in interface-event.c around the referenced event-handling code and trace how link changes become hotplugd events. Add the IFEV_LINK_UP event for an interface returning to the up state, then verify that a hotplug script can receive it after the link recovers.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.