2
0

5 Commits

Author SHA1 Message Date
Peter Collingbourne
15a886cf9a ifwait: Fix flapping on bridged interfaces
We use ifwait to monitor a bridged interface so we can add or remove it
to the bridge by bringing the associated service up or down. However,
bridge related netlink events can cause ifwait to incorrectly consider
the interface to have gone down. For example, nlmsg_type=RTM_DELLINK
with ifi_family=AF_BRIDGE, which is triggered by removing an interface
from a bridge, and does not indicate that the interface itself was
removed. Because a later RTM_NEWLINK will indicate that the link is still
up, ifwait will bring the service down and then up again, triggering
more netlink messages that keep ifwait in an infinite loop.

Fix it by checking specifically for RTM_NEWLINK and RTM_DELLINK messages
with ifi_family=AF_UNSPEC, which indicates an event related to the
interface itself.
2026-05-03 04:02:31 -07:00
7e2b0068e6 nixfmt-rfc-style
There is nothing in this commit except for the changes made by
nix-shell -p nixfmt-rfc-style --run "nixfmt ."

If this has mucked up your open branches then sorry about that. You
can probably nixfmt them to match before merging
2025-02-10 21:55:08 +00:00
e94bf62ec1 remove dead code (run deadnix) 2024-06-29 22:59:27 +01:00
14dacb8056 update netlink-lua to latest 2023-02-28 20:56:19 +00:00
03aec58c2c add "waitup", s6 readiness helper for network interfaces
run e.g. "waitup wlan0 10" to wait until wlan0 is operationally
up and running, and then send a newline to file descriptor 10
2023-02-24 23:22:28 +00:00