83 Commits
Author SHA1 Message Date
Joachim Wiberg 3a7ef41629 package/skeleton-init-finit: adjust mdns daemon's pid file path
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-22 20:23:42 +01:00
Joachim Wiberg adee27f923 Minor, consolidate naming and adjust avahi + mdns-alias conditions
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:11 +01:00
Joachim Wiberg 06361032d2 confd: add support for user configurable https certificate
- Add x509-public-key-format identity to crypto-types
 - Add certificate node to web services container
 - Use certificate from ietf-keystore as web cert

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:07 +01:00
Joachim Wiberg 3deb021bce board/common: postpone start of dbus to after confd bootstrap
Infix technically does not need to start dbus and dnsmasq before confd
has loaded the system startup-config.  So we move it in time to save
some CPU cycles for confd & C:o.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:03 +01:00
Joachim Wiberg 9ea1e82728 package/skeleton-init-fint: increase zebra netlink buffer
Increase Zebra NETLINK buffer to fix reported issues with zebra being
out of sync with kernel routes and interface changes.

Also, try '-a' option to allow other processes to delete zebra routes.

Other changes in this commit:
 - Minor fixes to Finit service files for consistency
 - Empty daemon.conf stub files to silence bogus mgmtd errors at startup
 - Relocate all skeleton files from board/common to separate from files
   that are actual Infix additions and what's package system integration

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:25:29 +01:00
Joachim Wiberg 4522d9f217 package/netd: rename NETD_FRR to NETD_FRR_GRPC, select FRR_GRPC
Rename BR2_PACKAGE_NETD_FRR to BR2_PACKAGE_NETD_FRR_GRPC to match the
naming convention of the other FRR backends (VTYSH, CONF) and make the
intent self-evident.

Have the gRPC backend select BR2_PACKAGE_FRR_GRPC so FRR is built with
gRPC support when — and only when — this backend is chosen.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-26 13:43:40 +01:00
Joachim Wiberg 4a31df1059 netd: add vtysh -b backend
This is a simpler approach than both grpc and watchfrr.  Since we only
really need dynamic handling of static routes (for DHCP), we can track
changes made and maintain a "diff engine" for the resulting frr.conf.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-24 06:59:32 +01:00
Joachim Wiberg 965906e2ff netd: add support for frr.conf backend with waitfrr service
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-24 06:59:31 +01:00
Mattias WalströmandJoachim Wiberg 8c9e36ba5d Upgrade FRR to 10.5.1
This includes adding a netd-daemon since FRR has gone towards all
daemons should be configured from mgmtd using YANG, netd uses gRPC to
reconfigure in mgmtd

Signed-off-by: Enable grpc
2026-02-24 06:59:07 +01:00
Joachim Wiberg b58550367c sys: rename sys-cli -> sysrepo + klish
Previously the sys-cli group was for interactive shell access, but with
ever changing requirements this split has become necessary.

This commit introduces the 'sysrepo' group for low-level access to all
sysrepo commands, i.e., bootstrap only.  For user-level shell access a
'klish' group is added which allows users to connect to the CLI.  This
is now the only group users, including the default 'admin', are members
of, effectively making the new 'copy' tool the norm.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:44:14 +01:00
Joachim Wiberg 1cbc9a49a2 confd: initial support for rip
Fixes #582

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-05 10:58:35 +01:00
Joachim Wiberg 18e80ceb11 confd: extend syslogd support with hostname-based filtering
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 14:05:36 +01:00
Joachim Wiberg 3c1e9f3199 confd: reduce dhcp-server to minimal scope
- dnsmasq:
   - allow listening to all interfaces again to serve DHCP leases
   - disable most of the default DHCP options, keep broadcast and
     netmask because when dnsmasq can infer these they are better
     than breaking networking for clients -- note, they can still
     be overridden from global/subnet/host scope -- and for relay
     setups they need to be supplied anyway
 - confd:
   - drop per-interface dnsmasq, although practical for many use-cases,
     having a per-subnet focused server means improved integration with
     future stand-alone dhcp relay setup
   - implement suggested, simplified, yang model

Fixes #703

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:28 +01:00
Ahmed Karic 28c0cee4e3 confd: Enable configuring LLDP tx interval
This change introduces the configuration of the tx-interval parameter
for the LLDP service, allowing control over the frequency of LLDP hello
messages. This improvement eliminates the need to toggle the interface
down and up to force the emission of LLDP packets in the test
environment.
2025-01-21 22:44:59 +01:00
Tobias Waldekranz 26d06bd13b skeleton: mstpd: Let /sbin/bridge-stp add/remove bridges 2025-01-08 09:57:55 +01:00
Mattias Walström 37b97d9e4c Add support for configurable SSH server 2024-12-19 14:42:17 +01:00
Joachim Wiberg e8f9032339 package/skeleton-init-finit: avahi needs to be restarted
The Avahi daemon needs to be restarted when changing its configuration
file in /etc/avahi/avahi-daemon.conf, not sufficient to SIGHUP.

Also, minor reformatting for new style.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-12-04 12:57:04 +01:00
Joachim Wiberg 6072ec45b3 patches: add support for adjusting avahi-daemon log level
The mDNS daemon, Avahi, is very verbose in its syslog output.  So much
that it often overshadows other subsystems, and on switches and routers
with more than the "normal" amount of ports and interfaces, it quickly
becomes unbearable.

The patches consist of:

 - Add -l LEVEL support to avahi-daemon
 - Add missing casll to setlogmask() in libdaemon:daemon_set_verbosity()

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-28 15:11:26 +01:00
Joachim Wiberg 0160fd539e package/skeleton-init-finit: ensure zebra+ospfd log to syslog
Fix lack of syslog messages from Zebra and add support to easily enable
debug logs for common Zebra subsystems.

Same change made to ospfd for symmetry.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-24 20:50:12 +01:00
Joachim Wiberg fa6851caa6 board/common: set DHCP and ZeroConf routes using Frr/staticd
This patch changes the way Infix DHCP and ZerocConf clients set their
routes in the system.  Instead of setting them directly in the kernel
we ask FRR staticd to set them for us.

The reason for this change is to be able to override routes from these
protocols with locally set static routes.  The routes are now set with
a distance of 5 and 254, respectively, while static routes by default
have a distance of 1.  In contrast, kernel routes are always treated
by Frr as distance 0, i.e., they are preferred over static routes.

Finally, this patch drops the use of Linux legacy interface aliases, or
colon interfaces, in an effort to reduce confusion for end users.  This
may give some odd results if using older tools like ifconfig, so we
recommend using 'show interfaces' or 'ipb a' instead.

Fixes #640

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg add52cdb38 confd: add support for IPv4LL request-address option
This patch allows a user to specify a specific 169.254/16 address that
the zeroconf client starts with when probing for a free address.  If the
probe fails it falls back to its default algorithm.

Fixes #628

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg f0506c6cd5 package/skeleton-init-finit: drop log rotation from command line
With the latest sysklogd backports syslogd now supports log rotation
settings in the .conf files, which we'll add yang support for later in
this patch series.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-08-26 20:54:49 +02:00
Joachim WibergandTobias Waldekranz df89b22062 board/aarch64/r2s: add support for reset button
This patch further cleans up the r2s kernel config and also enables the
input event framework for the gpio0 reset button on the device.

The very simple input-event-daemon is introduced, with the only purpose
of listening to /dev/input/event1 for KEY_RESTART and trigger reboot.

Some helpful tooling is also added to help debug events (evtest).

Issue #276

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-08-16 16:47:28 +02:00
Joachim Wiberg 173e6040fe confd: allow non-admin users to use the CLI, NACM rules apply
With this patch, users not in the NACM admin group and a login shell set
to clish can now log in to the CLI.  Prior to this change only members
of the UNIX group 'wheel' could open the klishd socket.

The patch adds another group, 'sys-cli', which acts as a capability for
users.  An admin user (member of the admin group) will now be member of
both the UNIX 'wheel' and 'sys-cli' groups.  A non-admin user that has
shell set to 'clish' will only be member of the 'sys-cli' group.  Other
users will not be mapped to any UNIX group and have only permissions set
in NACM.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-06-25 17:22:36 +02:00
Joachim WibergandTobias Waldekranz 474820c44b Fix #424: regression, root user can log in without password
This fixes a serious security regression introduced late in the v24.04
release cycle.  The root cause is the placement of the shadow file in
the rootfs overlay, which causes any changes made by the Buildroot
setting BR2_TARGET_ENABLE_ROOT_LOGIN to be discarded/overwritten just
before creating the squashfs image.

The fix in this commit relocates all files from b4eb450 to the skeleton
in Infix, package/skeleton-init-finit/skeleton/etc, which is one of the
first packages to be installed when starting a build.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-05-03 07:54:48 +02:00
Joachim Wiberg dcd7cb1a77 package/sysklogd: backport fix for kernel logs to console
- Backport fix to allow raw kernel logs to console
 - Save 10 rotated (and gzipped) backups of all logs

The latter change was discussed a few weeks ago.  We determined it was a
safe number since all active products have eMMC with *lots* of storage.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-25 09:20:32 +02:00
Joachim Wiberg 874873e727 board/common: add nginx HTTPS server, with dependency on mkcert
Refactor setup to automatically redirect http -> https, dropping
the /browse location for now.

Also, log to syslog, which has log rotation.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-15 15:36:41 +02:00
Joachim Wiberg 32635364aa package/mcd: new package, replaces querierd
Update all package references and confd:ietf-interfaces

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-03-09 11:58:40 +01:00
Joachim Wiberg 4793cf0770 package/skeleton-init-finit: silence mdev/mdevd/udevd log notices
On every system reconf (initctl reload) the .conf files are evaluated
again and log notices about skipping alternative syslogd enties are
logged.

We know that we run the udevd dependend syslogd entry, and everything
else basically in runlevel S depends on it, so not much else would work
if syslogd didn't start.  So we can safely set 'nowarn'.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-02-25 19:49:27 +01:00
Joachim WibergandMattias Walström e821db57ce package/skeleton-init-finit: start sysklogd on classic builds
Classic builds don't have udev but rather mdev or mdevd.  This patch
imports support from myLinux for conditionally starting sysklogd on
classiic builds.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-12-27 06:36:48 +01:00
Joachim WibergandTobias Waldekranz a36338f222 package/skeleton-init-finit: watchdogd must be in root cgroup
Since watchdogd may need to run with SCHED_RR, when the supervisor is enabled,
which is not supported by cgroupsv2, we ask Finit to always runs it in the
root cgroup.  We must also raise the limit for rtprio to all possible values
for SCHED_RR that a user can set in /etc/watchdogd.conf

Finally, add support for reading extra args from /etc/default/watchdogd

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-12-18 17:32:27 +01:00
Joachim WibergandTobias Waldekranz a6043ba4bc package/skeleton-init-finit: minor, add comment explaining the name
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-12-18 17:32:27 +01:00
Mattias WalströmandJoachim Wiberg 4e7bdc58d4 Add OSPFv2 support
A very limited part of the YANG model is implemented so far, basicly it is OSPFv2 with multiple areas and you can change timers
for the interfaces. Limited operational support.

admin@infix-00-00-00:/config/> edit routing control-plane-protocol ietf-ospf:ospfv2 name default
admin@infix-00-00-00:/config/routing/control-plane-protocol/ietf-ospf:ospfv2/name/default/> set ospf area 0.0.0.0 interface e0 enabled true
admin@infix-00-00-00:/config/routing/control-plane-protocol/ietf-ospf:ospfv2/name/default/> leave
2023-12-18 17:28:00 +01:00
Tobias Waldekranz 769b7c2ba1 package/skeleton-init-finit: Run the getty in runlevel 9
Normally, no logins are actually possible, but this will have two
desirable effects effects:

- /etc/issue will be printed when hitting return over the console,
allowing the user to see the bootstrapping errors again, without
having to reboot the system.

- On devleoper builds, with CONFIG_TARGET_ENABLE_ROOT_LOGIN, we can
login as root and debug issues.
2023-11-30 11:39:42 +01:00
Tobias Waldekranz f4a604f63c Prevent non-essential services from running in runlevels > 6
In case failure-config fails to load, we park the system in runlevel
9. In this state, we only want the most essential services running.
2023-11-30 11:39:42 +01:00
Mattias WalströmandJoachim Wiberg 1fd98758ba frr: add specific configuraion file
The new default behaviour is one gigantic file (frr.conf)
2023-11-17 07:19:28 +01:00
Joachim WibergandMattias Walström 9f792d56d6 package/skeleton-init-finit: hardening, no login services in RMA
When Infix Fail Secure Mode ends up in RMA state, runlevel 9, we should
not allow Finit to "time out" and give us a login prompt.  Instead we
disable all login services in runlevels 7-9, reserving these extra
levels for future failure modes.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-11-13 10:28:47 +01:00
Joachim WibergandTobias Waldekranz 5bad7f472f Guard system critical bootstrap services behind <pid/syslogd>
This ensures they do not start earlier than the system log daemon.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-09 10:41:46 +02:00
Joachim WibergandTobias Waldekranz fd366e78f6 package/skeleton-init-finit: rename condition set by sysklogd -> syslogd
The sysklogd and BusyBox syslogd can not run at the same time.  Since they
provide the same service we standardize on them providing <pid/syslogd>.

Also, ensure syslogd does not start until the fifth udevadm has completed.
This creates a barrier preventing other run/task/services from starting
too early.  Thus guaranteeing a proper boot order.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-09 10:41:46 +02:00
Joachim WibergandTobias Waldekranz acd33d4fa5 board/common: drop duplicate sshd.config and ssh-hostkeys
Instead, use the version from package/skeleton-init-finit, including the
ssh-hostkeys (previously ssh-genhostkeys) from the same package, because
it include extensive error handling and logging on failure.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-09 10:41:46 +02:00
Joachim WibergandTobias Waldekranz d4820b598b Fix SSH hostkey generation and verification
This change addresses a problem accessing Infix over SSH.  The root cause
turned out to be the hostkeys, which live in /var/lib/ssh and not in /etc
on Infix, were corrupt.

The corruption was interesting in that they all existed, but had size 0.
This state was not caught by our ssh-genhostkeys script and that is what
this change attempts to fix.

As before this change, the script starts by calling `sshd -t` to verify
they hostkeys.  Unlike before we now check for 'invalid format' in the
output of that command.  If any file with invalid format is found, we
remove them and regenerate the hostkeys.

In this investigation it was found that the 'ssh-keygen -A' command that
generates hostkeys does not use the directories specified for the given
files in sshd_config, instead it always saves the files to /etc/ssh.

Also, since there is no panic in getting the hostkeys generated we can
allow the script to wait for syslogd to start before we run, even though
it all happens in runlevel S.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-09 10:41:46 +02:00
Joachim WibergandTobias Waldekranz 27387e5e27 package/skeleton-init-finit: rename SSDP service .conf
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-08-30 10:37:43 +02:00
Joachim WibergandTobias Waldekranz b31e2e9a74 package/skeleton-init-finit: let SSDP advertise every 30 sec, like LLDP
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-08-30 10:37:43 +02:00
Joachim WibergandTobias Waldekranz dba737b975 confd: add support for enabling mDNS/SD and SSDP discovery services
Also, for usability, add `name:<SVC>` to each service declaration so they
can be located more easily and/or enabled/disabled using the service they
provide.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-08-30 10:37:43 +02:00
Joachim WibergandTobias Waldekranz 72c8aaef0c package/skeleton-init-finit: enable fewer services by default
This patch drops auto-enable of services we want to be able to control
via NETCONF/YANG.  SSDP and mDNS/SD enable/disable configure support,
using native models, will be included in the same PR and LLDP+SNMP may
come later, using std. IEEE/IETF models, they are not critical atm.

Fix #118

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-08-30 10:37:43 +02:00
Joachim WibergandRichard Alpe 45466bcbc7 package/skeleton-init-finit: smcrouted default changes
- allow custom options sourced from optional /etc/default/smcrouted
 - don't enable smcrouted by default when enabled in Buildroot .config
   because normal use-cases require an /etc/smcroute.conf

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-07-04 09:35:47 +02:00
Joachim WibergandRichard Alpe d5c28bc454 package: replace TARGET_FINALIZE_HOOKS with POST_INSTALL
When calling `make foo-rebuild` one expects all the registered hooks in
the foo package to have been called by Buildroot.  The Buildroot manual
has this to say about the target-finalize hook:

> These hooks are run after all packages are built, but
> before the filesystem images are generated.  They are
> seldom used, and your package probably do not need them.

The correct hook to use for target packages is POST_INSTALL_TARGET_HOOK.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-07-03 13:51:30 +02:00
Joachim WibergandRichard Alpe de24d0389a package: relocate PROFINET packages to customer repo.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-07-03 13:51:30 +02:00
Joachim WibergandTobias Waldekranz e4a1261ad8 Fix #57: unneccesary lldpd restarts on configuration change
Instead of restarting lldpd we can call lldpcli to inform lldpd of the change.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-30 14:13:09 +02:00
Tobias WaldekranzandJoachim Wiberg 82d11112a6 avahi-autoipd: Default to always assigning a LL address
Without --force-bind, the address is removed if another routable
address is added to the interface.

While this is likely something that should be configurable in the
future, we choose this mode as the default so that IPs used for
NETCONF connections are not dropped because other addresses are added.
2023-05-12 14:24:41 +02:00