1573 Commits
Author SHA1 Message Date
Mattias Walström e32b72d1ee yangerd: containers: widen event debounce to avoid podman contention 2026-06-27 08:41:22 +02:00
Mattias Walström 62b890f7b6 yangerd: Fix containers 2026-06-27 08:41:22 +02:00
Mattias Walström ce4184e048 yangerd: Change containers from polled to reactive 2026-06-27 08:41:22 +02:00
Mattias Walström f4de58a54c yangerd: Fix bugs with containers and boot order in CI 2026-06-27 08:41:22 +02:00
Mattias Walström b35f4df8a5 yangerd: Add arm 32bit support
Int => int64
2026-06-27 08:41:22 +02:00
Mattias Walström 8890274e90 yangerd: add missing files 2026-06-27 08:41:22 +02:00
Mattias Walström 8b60e447f3 yangerd: Fix ntp and lldp status 2026-06-27 08:41:22 +02:00
Mattias Walström d90d0d2a9c yangerd: Return {} instead of 404 if no match 2026-06-27 08:41:22 +02:00
Mattias Walström 6a669e6d92 statd: Adapt to yanger keys on module:container path
Instead of relying of the runtime xpath, which can be just /system-state
for example, resulting on no yangerd match.
2026-06-27 08:41:22 +02:00
Mattias Walström 39114f89dd yangerd: Add missing files 2026-06-27 08:41:21 +02:00
Mattias Walström bf850f59d7 yangerd: Add support for getting ARP neighbors 2026-06-27 08:39:48 +02:00
Mattias Walström 56b7904d1a statd: Remove old code 2026-06-27 08:39:48 +02:00
Mattias Walström 3e23997289 yanger: Remove code duplication and fix upgrade
Remove a lot of duplication and move to seperate libs in internal/

Also, instead of polling upgrade status using src/rauc-installation-status,
hook into the dbus monitor.
2026-06-27 08:39:48 +02:00
Mattias Walström c7ab211e51 yangerd: Add WiFi implementation 2026-06-27 08:39:48 +02:00
Mattias Walström 32bed66267 yangerd: Add backoff if ip batch work have crashed 2026-06-27 08:39:48 +02:00
Mattias Walström 73f6b52a70 yangerd: Add wireguard support 2026-06-27 08:39:48 +02:00
Mattias Walström 9e403831b3 yangerd: fix stp status 2026-06-27 08:39:48 +02:00
Mattias Walström b40f64492f yangerd: Send sighup to yangerd on config change
This is to force yangerd to repoll polled things
2026-06-27 08:39:48 +02:00
Mattias Walström 6ce28a7e40 Fix containers, reactive now. 2026-06-27 08:39:48 +02:00
Mattias Walström 72d3777d3f Fix ntp and dns status 2026-06-27 08:39:48 +02:00
Mattias Walström 02db44bb82 FRR does not send delete on OSPF route change
Handle this.
2026-06-27 08:39:48 +02:00
Mattias Walström 4cc9751c7b Fix interface and bridge race conditions 2026-06-27 08:39:48 +02:00
Mattias Walström 7b45f2589c zapi: Fix deletion of routes 2026-06-27 08:39:48 +02:00
Mattias Walström ad67a5aacf yangerd: Continues 2026-06-27 08:39:48 +02:00
Mattias Walström fdbf00ca76 Fix routing and ip addresses 2026-06-27 08:39:47 +02:00
Mattias Walström 4131167ede update doc 2026-06-27 08:39:47 +02:00
Mattias Walström 281adb45b6 statd: Include new yangerd backend for operational 2026-06-27 08:39:47 +02:00
Mattias Walström 35f8d6e3d5 move yanger 2026-06-27 08:39:47 +02:00
Mattias Walström 1e932f09c1 yangerd: Initial 2026-06-27 08:39:47 +02:00
Mattias Walström 30907b0343 TEMP: Update yanger spec 2026-06-27 08:39:47 +02:00
Mattias Walström 89fee60663 TEMP: WiP document 2026-06-27 08:39:47 +02:00
Mattias WalströmandGitHub 6d6064f946 Merge pull request #1548 from kernelkit/veth-regression 2026-06-26 18:30:50 +02:00
Joachim Wiberg ddc57ed6ae confd: fix veth teardown regression
When a veth pair has one end in a container and the other in the host
namespace, removing it failed: the container end's teardown deleted the
whole pair, so the host end's own delete then failed ("Cannot find
device") and aborted the teardown, leaving the interface behind.

The host-namespace delete added for the both-ends-in-container case was
emitted for every container veth end.  Restrict it to the primary end,
which for a host/container pair is the host end that already deletes the
pair itself.

Extend the container veth tests to remove the pair and verify it is gone,
covering both the single-end (regression) and both-ends teardown paths.

Fixes: #1546

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-26 16:05:53 +02:00
Mattias Walström f866cf15b4 confd: schedule: generate in change, apply in done
Write the crontab to admin.next on change and promote it on done, drop it
on abort.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2026-06-26 13:33:44 +02:00
Mattias Walström 7030f85484 confd: schedule: start crond only when a schedule is active
crond shipped auto-enabled in finit (symlinked into enabled/), so it ran
on every boot.  With no cron jobs /var/spool/cron/crontabs does not exist
and 'crond -f' exits non-zero, which finit then crash-loops until it gives
up ("Service crond keeps crashing, not restarting").

Ship crond available-only and let confd manage it: the schedule plugin
already rebuilds the crontab on every change, so enable + touch crond when
at least one consumer is active and disable it otherwise.  No jobs, no
crond, no crash loop.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2026-06-26 13:33:44 +02:00
Joachim Wiberg 674fd6c396 confd: allow both ends of a veth pair to be assigned to containers
Previously at least one end of a veth pair had to remain in the host
namespace, because that end created and destroyed the pair.  Assigning
both ends to containers left no one to create it.

Select a deterministic primary end so exactly one side creates the pair.
When the primary is itself a container interface, create the pair in the
host namespace before the container starts; CNI host-device then moves
each end into its container.  Teardown is deferred to the container
removal script so the pair does not linger and block re-creation.

Drop the now-obsolete limitation notes from the documentation and YANG,
and add a regression test connecting two containers over a veth pair.

Fixes: #941

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-20 19:26:22 +02:00
Joachim Wiberg 0229057612 statd: fix temperature sensor display on Marvell switches
The per-port PHY temperature sensors on Marvell DSA switches show up in
'show hardware' with the name the kernel derives from the full device
tree path, e.g. cp0busbusf2000000mdio12a200switch2mdio01, which honestly
is completely unreadable and also overruns the value column.  Name each
sensor after the front-panel port it serves (e1, e2, ...) by matching
the PHY's device-tree phandle against each interface's phy-handle.

Also:
- show system: report a representative SoC temperature on CN913x by
  matching the ap-* and cp<N>-* thermal zones, hottest wins.
- cli-pretty: truncate over-long sensor names so they can never spill
  into the value column again.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-20 19:26:21 +02:00
Joachim WibergandGitHub 25ff6f54f5 Merge pull request #1541 from kernelkit/web-vendoring
Use kernelkit/goyang instead of patched builtin
2026-06-18 17:05:02 +02:00
Ejub Sabic 797c5c09f1 fix: remove infix from commands and state files
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
2026-06-18 13:12:18 +02:00
Ejub Sabic be6d287b19 web: added update notification on web-ui
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
2026-06-18 10:59:03 +02:00
Ejub Sabic 67ea7a74c1 feat: infix-schedule based on ietf-schedule implementation
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
2026-06-18 10:22:35 +02:00
Joachim Wiberg d02f45d777 webui: depend on kernelkit/goyang fork instead of an in-tree copy
The three YANG 1.1 fixes lived as a frozen, one-shot copy of goyang
v1.6.3 under internal/goyang (via a local `replace`) — invisible to
dependency/CVE tracking and impossible to update.  Move them to the
maintained kernelkit/goyang fork (v1.6.3-kkit branch) and depend on it
through go.mod, pinned by commit hash; drop the in-tree copy.  getopt
falls out of the dependency set since it was only used by goyang's CLI,
not pkg/yang.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-17 20:50:01 +02:00
Joachim Wiberg a47e141dc4 webui: only flag unsaved changes when running differs from startup
The "unsaved changes" banner was set unconditionally at every site that
touches config, so it could appear when running-config actually equals
startup — contradicting the "Show diff" modal, which correctly showed
nothing.  A shared updateCfgUnsaved helper now compares running against
startup (the same datastore pair the diff uses) and sets or clears the
banner cookie to match:

 - Apply and restore-to-running clear it when an Apply/restore reverts
   an out-of-band (e.g. CLI) change back to match startup, instead of
   always showing it.
 - The advanced-tree presence toggle writes only the candidate
   datastore, so it no longer sets the running-vs-startup banner at all
   (matching the other candidate-only tree handlers).

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-17 12:48:06 +02:00
Joachim Wiberg 93db076d72 webui: re-read console/netbrowse shortcuts on full page load
These two shortcuts are toggleable in the configuration but were only
detected once at login and baked into the session, so disabling them
didn't drop the topbar icon / user-menu entry until re-login.

Refresh just those two from running-config on full page loads (htmx
swaps and pollers, which never re-draw them, are skipped), so toggling
takes effect on the next reload without logging out.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-17 11:11:29 +02:00
Joachim Wiberg 322811d712 webui: select password hash, mask inputs, hover help on user forms
Add a Hash dropdown to the add-user and change-password forms — yescrypt
(default), SHA-512, SHA-256, MD5 — passed through to mkpasswd. These are
exactly the four hashes the infix-system:crypt-hash YANG type accepts;
unknown values fall back to the default. Password inputs switch to the
CSS-masked type=text used by keystore secrets, which keeps the browser
password manager from offering to save device credentials. Each add-user
field gets a YANG description as a hover tooltip.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-17 10:32:46 +02:00
Joachim Wiberg bbc01a5e54 webui: add "Show diff" to the unsaved-config banner
Adds a button next to "Save to startup" that opens a modal showing a
unified diff between startup-config and running-config, so the pending
changes can be reviewed before persisting them.  The handler fetches
both datastores over RESTCONF (same serializer → low-noise diff),
writes them to temp files, and runs busybox `diff -u`.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-17 10:32:45 +02:00
Joachim Wiberg 584d6c57df webui: make Users summary static, edit shell on expand
Move the per-user shell editor out of the always-visible row into the
expanded detail; the summary now reports the shell as plain text.  This
also fixes the editor showing "bash" for non-bash users: the dropdown
matched the module-prefixed option value against the bare stored shell,
so it never matched and fell back to the first option.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-17 10:32:44 +02:00
Joachim Wiberg 4d398bbf57 test: skip webui test when not available in build
Add conditional YANG feature 'web-ui' to infix-services.yang, set when
the webui is built.  This feature is what the test now looks for to
determine if it should be skipped or not.

Also, clean up remnant of old test, which was entirely replaced by
Mattias' login/csrf test.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-17 10:30:43 +02:00
Joachim Wiberg 7e19ee8777 webui: add Connectivity and Addresses cards to Overview
Surface network diagnostics the Overview lacked: default gateway(s) with
a live reachability dot, an Internet reachability check, the effective DNS
resolvers (origin static vs DHCP, plus the interface), search domains, NTP
sync, and the IP addresses of every L3 interface.

All from the operational datastore. Reachability is an async per-address
ping (pulsing green dot on reply, red cross on none).

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-15 21:02:16 +02:00
Joachim Wiberg 7e0e6f244d webui: user-menu Auto-logout and theme fixes
Auto-logout was client-side only while the server kept a fixed 1h idle
timeout, so "Off" still logged you out. Sessions now carry a per-session
timeout the client syncs from the menu (0 = never), capped at 24h.

Theme: the login toggle icon was never initialised on load (stuck on the
'auto' glyph); add color-scheme so native controls follow the OS on
'auto', and re-apply on OS theme change.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-15 21:02:15 +02:00