From 301fbcc26d2c166517986212543746b27acee1eb Mon Sep 17 00:00:00 2001 From: Ryan Lahfa Date: Thu, 5 Sep 2024 14:59:16 +0200 Subject: [PATCH] fix(ap01): fix _one_ race condition when bridging the LAN The remaining is hostapd notification that the WLAN interface is ready to bridge. Signed-off-by: Ryan Lahfa --- machines/ap01/_configuration.nix | 15 +++++++++------ npins/sources.json | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/machines/ap01/_configuration.nix b/machines/ap01/_configuration.nix index ef8c300..a098d1c 100644 --- a/machines/ap01/_configuration.nix +++ b/machines/ap01/_configuration.nix @@ -119,11 +119,14 @@ rec { services.bridge = svc.bridge.members.build { primary = services.int; - members = with config.hardware.networkInterfaces; [ - lan - # wlan0 - wlan1 - ]; + members = { + lan.member = config.hardware.networkInterfaces.lan; + wlan1 = { + member = config.hardware.networkInterfaces.wlan1; + # Bridge only once hostapd is ready. + dependencies = [ config.services.hostap-2 ]; + }; + }; }; services.resolvconf = oneshot rec { @@ -152,7 +155,7 @@ rec { interface = config.services.int; dependencies = [ config.services.hostname - config.services.bridge + config.services.bridge.components.lan ]; }; diff --git a/npins/sources.json b/npins/sources.json index e92ab21..4409ff6 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -131,9 +131,9 @@ "url": "https://git.dgnum.eu/DGNum/liminix.git" }, "branch": "main", - "revision": "4ff772639f9bb5d079a50b2b69f3ddc9053f2e9a", + "revision": "0fb671023c0571d936a568721c67819a23cf63c0", "url": null, - "hash": "1jh2115ajh26362fazkmyhvv6zvp5z3yjynl91kgsvvld936169c" + "hash": "0d7hyl89049flqvxzpvj938ma30fi3y58y4z6gjj2038v2vsd2f1" }, "linkal": { "type": "Git",