liminix/modules
Raito Bezarius 1bd9af1e9d fix(bridge): reorder initialization for bridge dependents
Consider the scenario where you run DHCPv4 on the primary bridge
interface.

You have no real interface to "wait upon", so it's OK. Nonetheless,
anything depending on successful completion of DHCPv4, e.g. adding a
default route, will block `s6-rc -v2 up change default`.

The way new interfaces are attached to the bridge is via `s6-rc -b -u
change $attach-oneshot-service`, this introduce in turn a deadlock.

At some point, DHCPv4 will timeout, unblocking the deadlock and
attaching the members to the primary bridge interface, making it ready
to send L2 broadcast packets for DHCP, unblocking DHCP in turn again.

This is not satisfying because we really want to have a no-hiccups
bring-up.

To fix this, we proceed to multiple changes:

- we remove `svc.ifwait.build` out of band `s6-rc -b -u $oneshot-attach`
  call, which is, by design, wrong here.
- users can now depend on the members service to know when a bridge is
  fully operational (we could make it more granular and let them depend
  on the LAN member joining rather than WLAN, etc.)
- users can also depend on the primary service being brought up rather
  than just being present, this is useful if you need to bring it up
  when it has AT LEAST one member to get link local address or MAC
  addresses (fixing DHCPv6 bring up as well because `ff02::1` is used
  there).

One thing is not addressed yet, if you are running a WLAN service using
RADIUS attached to the bridge, at bring up time, it will try to reach
out the external RADIUS server and *fail*.

To solve this, granular dependency on the DHCPv4 once LAN is joined.
Then the hostapd can wait on defaultroute4 completion so that
connectivity is available to reach RADIUS server.

It can join the bridge later on without any hiccup as well.

This is left as a TODO as hostapd can survive RADIUS authentication
failure and retry later.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-01 18:15:28 +02:00
..
arch tftp: introduce an alternative command line for TFTP 2024-09-01 17:48:54 +02:00
bridge fix(bridge): reorder initialization for bridge dependents 2024-09-01 18:15:28 +02:00
cdc-ncm make a serviceDefn for wwan 2024-05-24 17:23:27 +02:00
dhcp6c convert anoia.fs to use lualinux 2024-04-25 21:14:37 +01:00
dnsmasq subdue dnsmasq logs 2024-02-15 23:43:54 +00:00
firewall set default for firewall extraRules 2024-05-03 16:28:53 +01:00
hostapd feat(hostapd): make the package configurable to enable RADIUS 2024-09-01 17:48:54 +02:00
ifwait unconditionally restart trigger services on liminix-rebuild 2024-04-03 23:07:56 +01:00
jitter-rng feat(jitterentropy): introduce a jitterentropy module 2024-09-01 17:48:54 +02:00
kernel build modules at same time as main kernel vmlinux 2024-02-11 23:47:11 +00:00
misc fix(assertions): wire up the assertion system 2024-05-24 19:00:04 +02:00
mount make uevent-watch use devout instead of direct netlink 2024-04-27 21:07:25 +01:00
network dhcpc handle case when env vars are missing 2024-09-01 17:48:54 +02:00
ntp add o+x permission on service-state directories 2023-08-28 22:02:28 +01:00
outputs fix(zyxel/nwa50ax): ubi cannot run on phram 2024-09-01 17:48:54 +02:00
pki feat(pki): init TLS PKI module 2024-09-01 17:48:54 +02:00
ppp exec xl2tpd 2024-05-24 17:23:27 +02:00
profiles firewall module: provide default rules and merge extraRules 2024-03-21 12:00:34 +00:00
s6 fix params to s6-rc-init 2024-03-28 21:56:28 +00:00
schnapps add turris "schnapps" tool 2024-01-05 00:07:01 +00:00
ssh use mkstate for dropbear keys 2024-02-13 22:12:26 +00:00
vlan vlan interface services depend on primary 2024-04-28 21:33:36 +01:00
watchdog watchdog: put s6 pkg on $PATH for s6-svstat 2024-04-17 13:01:10 +01:00
zyxel-dual-image modules/zyxel-dual-image: init 2024-02-19 02:48:50 +01:00
all-modules.nix feat(jitterentropy): introduce a jitterentropy module 2024-09-01 17:48:54 +02:00
base.nix fix(preinit): scan multiple times the cmdline and rename altroot in rootalt 2024-09-01 17:48:54 +02:00
busybox.nix modules/busybox: add dhcprelay 2024-02-19 02:48:50 +01:00
hardware.nix fix(modules/hardware): default for ubi.mtds is [] 2024-08-23 19:37:43 +02:00
hostname.nix describe hostname option 2023-08-16 22:26:40 +01:00
mdevd.nix make uevent-watch use devout instead of direct netlink 2024-04-27 21:07:25 +01:00
nixpkgs.nix fix(nixpkgs): drop meta.* 2024-05-24 19:00:29 +02:00
outputs.nix fix(assertions): wire up the assertion system 2024-05-24 19:00:04 +02:00
ramdisk.nix improve grammar of mkEnableOption descriptions 2023-08-04 20:19:27 +01:00
squashfs.nix move squashfs kernel options into module 2023-08-30 22:59:28 +01:00
usb.nix add usb storage for turris omnia 2024-01-26 22:46:36 +00:00
users.nix improve doc 2023-08-16 22:52:16 +01:00
wlan.nix use regular kernel not backports for mac80211 2024-02-12 20:41:10 +00:00