Compare commits

...
378 Commits
Author SHA1 Message Date
Joachim Wiberg 6f210174c2 package/skeleton-init-finit: enable rngd by default
Platforms with /dev/hwrandom use that to see /dev/urandom.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-05 13:32:38 +01:00
Joachim WibergandGitHub c81b03e1ca Merge pull request #796 from kernelkit/rtc
Support for save/restore system clock from file
2024-11-05 13:05:59 +01:00
Joachim WibergandGitHub bca13137a3 Merge pull request #800 from kernelkit/jovatn-test-arch-doc-fix
Update test-arch.md
2024-11-04 14:25:48 +01:00
Jon-Olov VatnandGitHub 6ba13776df Update test-arch.md
Fixing typo

[skip ci]
2024-11-04 14:19:29 +01:00
Joachim Wiberg 1323d2f266 doc: update ChangeLog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-04 11:33:51 +01:00
Joachim Wiberg 79d7e8bbab configs: allow aarch64 targets to save system clock to a file
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-04 11:10:53 +01:00
Joachim Wiberg 5a38e8768b package/finit: backport upstream v4.9-pre patches
Backport support for saving and restoring system time from a file on
systems with broken RTC that reset to the future.

With this support a system can be sure time only ever moves forward.

Fix #794

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-04 11:10:53 +01:00
Joachim Wiberg c23b9c2dc4 package/finit: fix missing default hostname
The string variable handling in configuring Finit did not follow the
Buildroot best practises.  This patch adds stripping quotes from all
string variables before adding them as configure arguments.

This fixes issue with, e.g., this sneaky bastard:

    configure --with-rtc-date=""2024-10-12 12:34:56""

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-03 22:14:00 +01:00
Joachim Wiberg 5261e4f66f board/common: add support for tweaking RTC behavior
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-03 22:14:00 +01:00
Joachim Wiberg a6b7b3d2c0 board/common: fix issue with grub menu being misaligned
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-03 22:14:00 +01:00
Joachim Wiberg b4d6c787d5 board/common: allow more logging to stdout before starting qemu
Creating/Recreating the qcow2 image now logs to stdout, as does the check
using qemu-img, which looks funny in raw mode.  So let's delay the start
of raw mode until just before starting qemu.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-03 22:14:00 +01:00
Joachim Wiberg 58b2ade1e6 board/common: don't regenerate disk image when starting qemu
This fixes an annoying problem with `make run` when set to boot with a
qcow2 disk image.  By default the disk image was recreated every time
the qemu.sh script was called.

Also, add image check to enforce regen if broken.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-03 22:14:00 +01:00
Joachim Wiberg 228c93e430 board/common: hide /var option when booting disk image
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-03 22:14:00 +01:00
Joachim Wiberg 2938efc8a4 board/common: proper string check in /var/lib bind mount
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-03 22:14:00 +01:00
Joachim Wiberg ae82f7fdcf board/aarch64: disable rtc on styx, all revs
The RTC in the CN913x series does not have any "valid" bit, and this
board (all revs) does not have any backup power connected, so it will
return garbage values after every vold boot.

It was therefore decided to disable the RTC completely and set system
time manually, or using an NTP client.  This way any time skips would
only ever be forward, never backwards.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-03 22:14:00 +01:00
Jon-Olov VatnandGitHub fbddedb51b Merge pull request #792 from kernelkit/jovatn/doc-fixes
Minor doc fixes
2024-11-01 09:21:39 +01:00
Jon-Olov VatnandGitHub 43e2201dd1 Merge branch 'main' into jovatn/doc-fixes 2024-11-01 08:58:12 +01:00
Jon-Olov Vatn b8b0cd3377 Addressing feedback on doc fixes
[skip ci]
2024-11-01 08:54:47 +01:00
Jon-Olov Vatn 6b63b2f9b4 Minor doc fixes
[skip ci]
2024-11-01 08:27:13 +01:00
Joachim WibergandGitHub 142eda81d5 Merge pull request #783 from rical/cli-add-show-iface-cont-sup 2024-10-31 20:22:04 +01:00
Joachim WibergandGitHub fb3c026288 Merge pull request #791 from kernelkit/reboot-on-error 2024-10-31 20:21:33 +01:00
Mattias Walström b0f4192f24 kernel: Reboot device if kernel panics
The worst way of handling a kernel crash is to do nothing at all.
2024-10-31 15:55:47 +01:00
Richard Alpe b9492c7bee cli: add container support to show interfaces
Make show interfaces container aware. This is done by looking though
all podman containers for interfaces and looking up there info from
network namespaces on the main system / hypervisor.

Interfaces controlled by containers are clearly marked in the "show
interfaces" output, with a single gray row. Telling the user that they
belong to one or more named containers. The user can then run "show
interface name NAME" on interfaces owned by containers, which provided
some additional info, such as mac address and stat counters.

The patch also add support for printing veth peers which are owned by
containers.

Lastly, the patch also adds test cases for this functionality.

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-10-29 17:23:30 +01:00
Richard Alpe 31061fcc10 yanger: simplify setting of admin-status
There should be no functional change.
2024-10-29 17:22:59 +01:00
Joachim WibergandGitHub 3e8ead6f92 Merge pull request #778 from kernelkit/r2s-libssh-openssl 2024-10-29 09:14:21 +01:00
Jon-Olov VatnandGitHub b00b6cd6ea Merge pull request #766 from kernelkit/update-bridging-doc
Update bridging doc
2024-10-29 08:33:03 +01:00
Joachim Wiberg ba60b8b494 configs: re-enable OpenSSL backend for libssh/libssh2 also on R2S
Fixes issue with netopeer2-server failing to load its host certificate.

Follow-up to 8b75022 for the NanoPi R2S.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-29 05:47:57 +01:00
Mattias WalströmandGitHub 1e5d4612c9 Merge pull request #767 from addiva-elektronik/update-make-test-spec
Minor Update in Generating Test Spec
2024-10-28 15:16:36 +01:00
Ahmed Karic b359ac794d test: update make-test-spec to escape '/'
It has been identified that the sed command fails to process INFIX_NAME
when it contains an unescaped '/' character.
2024-10-28 13:18:46 +01:00
Ahmed Karic 3b00a376b1 test: regenerate .svg for dhcp_basic test
In the recent work, the generation and commit of topology.svg for the
dhcp_basic test was unintentionally overlooked.
2024-10-28 13:18:21 +01:00
Joachim WibergandGitHub 00cdff1d2d Merge pull request #761 from kernelkit/misc-interface-dhcp
Misc interface dhcp

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-28 12:38:25 +01:00
Joachim Wiberg 3e5e89b328 package/finit: backport fix to clear background color from GRUB menu
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-28 11:04:49 +01:00
Joachim Wiberg 56d1964559 doc: sync dev-guide and contributing guidelines
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-28 11:04:49 +01:00
Joachim Wiberg 0112113028 doc: add description of description setting and update ChangeLog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-28 11:04:49 +01:00
Joachim Wiberg 967bfc1e67 test: new test, verify ifAlias
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-28 11:04:49 +01:00
Joachim Wiberg 0284e2ca58 confd: allow interface description as ifAlias
This patch adds support for setting the free form description string as
the interface alias.  This can be read from /sys/class/net/*/ifalias, or
using the 'ip link show' command.  The ifalias is reported by SNMP and
LLDP by default, and now also in the operational datastore.

Linux supports 250 characters in ifalias, but the IF-MIB is restricted
to 64 characters, so we add a local deviation to limit the type.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-28 11:04:49 +01:00
Joachim Wiberg 710616f8c4 doc,test: clarify relationship between DHCP option 3 and 121
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-28 11:04:49 +01:00
Joachim Wiberg dbf0fd2514 board/common: fix rauc compatible regression
The new variable INFIX_COMPATIBLE, used for the RAUC compatible string,
is not properly evaluated on defconfigs where it is composed of another
variable, e.g.

    INFIX_COMPATIBLE="${INFIX_IMAGE_ID}"

Unfortunately, this is the default value for INFIX_COMPATIBLE, and so it
breaks all tier one defconfigs on the mainline branch since a1771ff.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-28 11:04:49 +01:00
Jon-Olov Vatn aefb90f8f3 Doc: Updating pictures in bridging examples
[skip ci]
2024-10-25 15:31:59 +02:00
Jon-Olov Vatn 49660b7771 Fixing #748 by updating doc on MAC bridging
- Introduce the term MAC bridge in the networking documentation
- List the limitation to one MAC bridge on Marvell Linkstree
- Adding lego pictures for the MAC bridge and VLAN bridge examples

[skip ci]
2024-10-25 15:21:00 +02:00
Ahmed KaricandGitHub 55a20bb4c7 Merge pull request #764 from addiva-elektronik/update-infix-test
Simplify Running Infix Tests from External Projects
2024-10-25 10:29:13 +02:00
Ahmed Karic 3b2bdbf93c test: simplify running infix tests from external
This will facilitate running infix tests from external projects:
  - eliminate the need for an external topology.dot.in file
  - eliminate the requirement to manually provide external image name

Fixes #763
2024-10-25 09:57:08 +02:00
Ahmed KaricandGitHub 04c843e095 Merge pull request #760 from kernelkit/update-dhcp-tests
test: update dhcp test topologies
2024-10-24 13:57:27 +02:00
Tobias WaldekranzandGitHub 1aa5169641 Merge pull request #757 from kernelkit/rauc-compatible2
Use INFIX_COMPATIBLE also for aux partition's rauc.status
2024-10-24 12:26:45 +02:00
Ahmed Karic 594d074f7a test: update dhcp test topologies
Fixes #746
2024-10-24 09:59:56 +02:00
jovatnandGitHub b81407e7d9 Merge pull request #759 from kernelkit/jovatn/doc-vlan-iface-qos
Update QoS documentation (VLAN interface ingress/egress priority)
2024-10-24 09:33:34 +02:00
Mattias WalströmandGitHub 8fc0ab9b2f Merge pull request #758 from kernelkit/update-test-spec
Update test spec
2024-10-23 14:50:47 +02:00
Mattias Walström 3b3656c8f5 test: spec: change image format from PNG to SVG
SVG is a plain text file, better to see why it changed
than binary PNG. Also fix #744 by adding infix/OEM hash
to test specification

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2024-10-23 14:21:26 +02:00
Jon-Olov Vatn 0eb1fe0ab0 Add QoS doc change to Changelog
[skip ci]
2024-10-23 13:55:28 +02:00
Jon-Olov Vatn 9be43ed0bb Updating colors in QoS complex example picture
[skip ci]
2024-10-23 13:47:30 +02:00
Jon-Olov Vatn 604f22e315 Updating QoS documentation
- More information on Software Forwarding, and its settings.
- Pictures added

[skip ci]
2024-10-23 13:47:30 +02:00
Mattias Walström 76f0c8e3e6 test:spec: Add version of Infix/OEM build
Show the version of the infix build, for traceability

This fix #744

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2024-10-23 13:45:30 +02:00
Joachim WibergandGitHub d36296da42 Merge pull request #754 from kernelkit/firewall-test
Container firewall test
2024-10-23 13:42:53 +02:00
Joachim WibergandGitHub 9f33658127 Merge pull request #756 from kernelkit/r2s-factory
Update r2s factory-config
2024-10-23 12:46:55 +02:00
Joachim WibergandGitHub 767a1f194b .github: create discussion for new releases
[skip ci]
2024-10-23 12:45:24 +02:00
Joachim Wiberg c7760a68cb test: update infix-containers group README
This is a proposal to how a test section/group overview could look.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-23 12:27:42 +02:00
Joachim Wiberg 933613e6a3 test: new basic firewall container test
Fix #598

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-23 12:27:42 +02:00
Joachim Wiberg 14fde1bf90 test: new util method to_binary()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-23 10:08:10 +02:00
Joachim Wiberg 64c20d96ad test: minor, cleanup
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-23 10:08:10 +02:00
Joachim Wiberg a1771ff5c6 board/common: use INFIX_COMPATIBLE also in rauc.status
Follow-up to cedb654, issue #755.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-23 10:03:22 +02:00
Joachim Wiberg a7e7b75a97 board/aarch64: update r2s factory-config
- add default-deny-all rule from 2341e07
 - enable iburst for the ntp client (quicker initial sync)
 - bump meta version (to skip .cfg migration at boot)

Fix #750 [skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-23 08:04:31 +02:00
Joachim WibergandGitHub 822cb93265 Merge pull request #755 from kernelkit/rauc-compatible
Add support for overriding the compatible string

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-22 19:36:31 +02:00
Joachim Wiberg cedb654643 Add support for overriding the compatible string
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-22 18:32:55 +02:00
Ahmed KaricandGitHub 52eafa70a8 Merge pull request #749 from kernelkit/disable-ntpd
Disable BusyBox Related NTP Services
2024-10-22 17:03:47 +02:00
Ahmed Karic 6ba8e3bf55 busybox: disable ntpd from defconfig 2024-10-22 13:28:39 +02:00
Joachim WibergandGitHub f119138107 Update SUPPORT.md
[skip ci]
2024-10-22 12:08:43 +02:00
Ahmed KaricandGitHub 5c822efa6f Merge pull request #742 from kernelkit/add-docs-ntp
Update system.md by adding NTP details
2024-10-22 09:50:03 +02:00
Mattias WalströmandGitHub 19d5f1db1c Merge pull request #752 from kernelkit/dsa-interface
Make detection of DSA interface more robust
2024-10-22 09:37:37 +02:00
Ahmed Karic 438e39d2fe doc: update system.md with ntp information
Fixes #733
2024-10-22 08:58:19 +02:00
Mattias Walström 0ee973b2b2 Make detection of DSA interface more robust
Sometimes the interface creation are done, but
the sysfs is not, this gap we sometimes finds
in the nameif script. Wait out the sysfs creation
if running a DSA switch.

Fix #685

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2024-10-22 08:50:54 +02:00
Joachim WibergandGitHub c0e68579c1 Merge pull request #737 from kernelkit/checklist
Checklist for code review and releases

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-21 10:10:25 +02:00
Joachim Wiberg 5b61ccd960 .github: update pull request template
For some documentation changes, e.g., the recent change in the QoS
documentation, see de76b97, it is highly relevant to also mention
this change in the release notes.

In fact, any change that would make it worthwhile for a user to
update their knowledge on a topic should probably be documented
in the release notes.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-21 10:09:39 +02:00
Joachim Wiberg 1dd761560d .github: add checklist for pull requests and releases
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-21 10:07:15 +02:00
Joachim Wiberg 076d174579 Update ChangeLog for v24.10.1
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-18 15:32:29 +02:00
Tobias WaldekranzandGitHub 1470c473f6 Merge pull request #736 from kernelkit/fix-missing-copy-command
Add missing copy and erase commands to CLI
2024-10-18 15:08:48 +02:00
Joachim Wiberg 9ae7115bbf doc: update ChangeLog for upcoming v24.10.1
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-18 14:16:51 +02:00
Joachim Wiberg f9a0c71b1f package/klish: make sure to select bin tools (copy, erase)
Fix #735

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-18 14:13:45 +02:00
Joachim Wiberg aad5bcd4e6 doc: update ChangeLog for v24.10.0
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-18 12:43:14 +02:00
Ahmed KaricandGitHub e875239639 Merge pull request #732 from kernelkit/fix-admin-perm
Allow admin to run 'show ntp'
2024-10-18 10:45:12 +02:00
Joachim WibergandGitHub 3bcc058969 Merge pull request #717 from kernelkit/copy-timeout
Fix too small timeout for copy command

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-18 09:44:16 +02:00
Ahmed Karic 3fa820b41e klish-plugin-infix: allow admin to run 'show ntp'
Fixes #730
2024-10-18 09:35:43 +02:00
Mattias WalströmandGitHub baec6cb35f Merge pull request #731 from kernelkit/minor-cli-fixes
Minor CLI fixes
2024-10-18 09:33:30 +02:00
Joachim Wiberg 903960f6a0 package/klish-plugin-sysrepo: add units to help text, hide obsolete
Fixes the following CLI issues:

 - kernelkit/klish-plugin-sysrepo#5 : hide obsolete nodes, e.g., meta/version
 - kernelkit/klish-plugin-sysrepo#6 : add units to online help text

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-18 08:55:44 +02:00
Joachim Wiberg 44727b9a47 confd: mark entire meta container obsolete
Mark meta data as obsolete to hide from CLI and other frontends.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-18 08:52:58 +02:00
Tobias WaldekranzandGitHub eac60b1883 Merge pull request #729 from kernelkit/led-fixes
Disable software LED control of port LEDs
2024-10-18 08:37:26 +02:00
Joachim WibergandGitHub b5abadd52a Merge pull request #728 from kernelkit/uboot-http-netboot-fixes
U-Boot HTTP Netboot Fixes

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-17 16:31:24 +02:00
Joachim Wiberg 4603649145 doc: software led control disabled on styx
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-17 16:02:14 +02:00
jovatnandGitHub c1f552a8dc Merge pull request #726 from kernelkit/jovatn/test-cases-minor-updates
Formatting fixes for test specification and topologies
2024-10-17 15:52:14 +02:00
Tobias Waldekranz c1dfdd92b0 uboot: Fix repeated calls to boot_net in combination with HTTP
Previously, when the `proto://path` format of `bootfile` was used, the
transformed argument sent to either tftp or wget would also be stored
in `bootfile` overriding the original value set by the user.

If the first boot attempt failed for some reason, the protocol
information was stripped from `bootfile` and the second attempt would
then default to TFTP, even if the user had originally specified
`http://...`.

Therefore, store the transformed value in a separate variable.

For some reason, setexpr's parsing of regex escapes changes when this
mode is used, so we need double backslashes to fetch match groups
instead of 1. Yikes.

Fixes #724
2024-10-17 15:38:47 +02:00
Jon-Olov Vatn d3b28339c1 Updating test specs to have consistent formatting 2024-10-17 15:11:19 +02:00
Tobias Waldekranz 563b4a743b uboot: Settle for only ipaddr being set to skip DHCP
This puts the responsibility on the user to set the appropriate static
parameters. On the plus side, we avoid requiring redundant information
when the `proto://path` format is used in `bootfile`
2024-10-17 15:11:12 +02:00
Jon-Olov Vatn 272a7c1e69 Formatting fixes for test specification and topologies
Also including some existing test to test specification, from ietf_system
and ietf_interfaces directories.
2024-10-17 15:11:12 +02:00
Joachim Wiberg 01e91a2fce package/finit: backport upstream rdeps patch
This patch fixes a upstream issue troglobit/finit#415, greatly reducing
the amount of service restarts, needlessly affecting, e.g., iitod when
services like syslogd¹ is reloaded.

____
¹) Traditional UNIX services that properly support SIGHUP.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-17 14:37:02 +02:00
Joachim Wiberg d7abe46768 board/aarch64: disable port led control on styx, for now
For details, see discussion in #670

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-17 13:03:29 +02:00
Ahmed KaricandGitHub 484dc940dc Merge pull request #723 from kernelkit/verify-iface-status
Verify Interface Status
2024-10-17 10:27:10 +02:00
Ahmed Karic 420f6a0556 test: verify interface status (enable/disable)
Fixes #694
2024-10-17 09:50:01 +02:00
Ahmed Karic 4d4a4c68e7 test: refactor iface.py 2024-10-16 19:01:40 +02:00
Joachim WibergandGitHub eb79adce13 Merge pull request #722 from kernelkit/use-specific-secret-add-to-project 2024-10-16 17:24:43 +02:00
Mattias Walström 9fd92252ea CI: Use specific token when calling add to project
[skip ci]
2024-10-16 11:25:03 +02:00
Mattias WalströmandGitHub 90bda1b584 Merge pull request #710 from kernelkit/fix-test-texts
test: Update topologies and test texts
2024-10-16 11:24:44 +02:00
Ahmed KaricandGitHub 15830714f0 Merge pull request #721 from kernelkit/add-admin-status-to-yanger
Statd: Add 'admin-status' to Interface Operational Data
2024-10-16 11:02:36 +02:00
Mattias Walström 34cb229965 test: Update topologies and test texts
All mgmt links should be lightgrey, all mgmt ports should be named mgmt
links between duts should be named link.
2024-10-16 10:51:01 +02:00
Ahmed Karic 3f0b85aad9 statd: Add 'admin-status' to yanger
The interface operational data was missing the 'admin-status' parameter,
which indicates whether an interface is administratively enabled or
disabled. To resolve this, the 'admin-status' was added to the yanger

Fixes #700
2024-10-16 10:33:09 +02:00
Tobias WaldekranzandGitHub 7de94b996a Merge pull request #718 from kernelkit/container-fixups
Container fixups
2024-10-16 09:14:14 +02:00
Joachim WibergandGitHub 09c019b236 Merge pull request #720 from kernelkit/jovatn/changelog-fixes
Doc fixes in ChangeLog v24.10.0 related to OSPF
2024-10-16 08:47:22 +02:00
Joachim Wiberg 526d3356c7 board/common: add example to erase partition table
[skip ci]

Related to: #671

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-16 08:37:16 +02:00
jovatnandGitHub 358852aa4f Doc fixes in ChangeLog v24.10.0 related to OSPF
Updating existing formulations for changes and fixes for OSPF.

[skip ci]
2024-10-16 08:32:57 +02:00
jovatnandGitHub 18640a78d5 Merge pull request #719 from kernelkit/jovatn/qos-doc-fix
Doc fix on QoS. PCP takes priority over DSCP for tagged IP packets
2024-10-16 08:03:06 +02:00
Jon-Olov Vatn de76b97c94 Doc fix on QoS. PCP takes priority over DSCP for tagged IP packets
This is how it works and how we want it to be by default.
No code change, just doc change.

[skip ci]
2024-10-16 07:49:30 +02:00
Joachim Wiberg 99e0a2ee1c confd: refactor hostnamefmt()
This refactor, and massive code simplification, is a follow-up to the
double free discovery in 3b4d2b3.

Beacuse a hostname in Linux can never be more than 64 chars, we can
safely use a stack buffer instead of calloc(), reducing complexity
and simplifying the code further with the use of strlcat().

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-16 07:36:35 +02:00
Joachim Wiberg 0d0e2b168a doc: update container notes
- Expand on Docker Hello World
 - Add more pictures to help break up the content a bit

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-16 07:31:41 +02:00
Joachim WibergandGitHub 08348c43c2 Merge pull request #716 from rical/fix-confd-cont-double-free
confd: fix double free of container hostname
2024-10-16 06:43:29 +02:00
Joachim Wiberg 343b453c74 bin: use CONFD_TIMEOUT for all copy operations
Fixes #701

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-16 06:10:39 +02:00
Joachim Wiberg 464e0bcb92 bin: factor out copy, erase, and files from klish-plugin-infix
Relocate C code from klish-plugin-infix to stand-alone binaries we can
use also from Bash.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-16 06:10:39 +02:00
Joachim Wiberg 886d83933f keyack: minor, whitespace and constification
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-16 06:05:22 +02:00
Joachim Wiberg ef1b1b1d1a statd: add missing dependency
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-16 06:02:49 +02:00
Richard Alpe 3b4d2b38d7 confd: fix double free of container hostname
Fix a double free in the memory minefield surrounding container
hostname provisioning. The hostnamefmt() function already does free()
on success.

This caused all sorts of mayhem when working with multiple containers.
However it mainly manifested itself by some containers not starting
due to there activation script being polluted with gibberish
name data. Your symptom might be different..

Example of polluted activation script:
container --hostname foobar --net veth0k -r always \
  create ^S@`M-}^G docker://ghcr.io/kernelkit/curios:edge

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-10-15 20:06:45 +02:00
Mattias WalströmandGitHub 0e276a97b8 Merge pull request #711 from kernelkit/minor-test-formating
test: minor code formating
2024-10-15 11:26:54 +02:00
Joachim WibergandGitHub afc40ac2bd Merge pull request #715 from kernelkit/update-pull-request-template
Update pull request template
2024-10-15 11:24:45 +02:00
Mattias Walström 5ea65aea0d Update pull request template
Add information about test changes

Also remove "Other information" since I think that
should also go under Description and to lower the amount of
text in the template, to increase its use.

[skip ci]
2024-10-15 11:21:58 +02:00
Ahmed Karic 614b7efd42 test: update test cases (refactor)
- change topology colors
- add ascii charts
- apply new naming conventions (indexing)
2024-10-15 10:32:25 +02:00
Joachim WibergandGitHub 024acb184d Merge pull request #714 from kernelkit/jovatn/container-doc-fixes
Doc: minor fixes to container doc
2024-10-15 09:53:36 +02:00
Jon-Olov Vatn e11008c7d2 Doc: minor fixes to container doc
[skip ci]
2024-10-15 09:24:35 +02:00
Joachim WibergandGitHub e2e947629c Merge pull request #713 from kernelkit/deviate-link-up-down-trap-enable 2024-10-14 22:10:52 +02:00
Mattias Walström 754426f7ed confd: deviate link-up-down-trap-enable not-supported
This fix #709
2024-10-14 21:14:10 +02:00
Joachim WibergandGitHub 31552bfc48 Merge pull request #712 from kernelkit/container-ifname 2024-10-14 21:01:38 +02:00
Joachim Wiberg de27d1c7e6 doc: update changelog with latest fixes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-14 19:41:01 +02:00
Joachim Wiberg 24b93074c5 doc: update container documentation a bit, more images
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-14 19:18:34 +02:00
Joachim Wiberg a14fada0ee confd: add support for container hostname format specifiers
This patch makes it possible to use format specifiers to "uniqiefy" a
container's hostname in the same way as with ietf-system hostname.

The following specifiers are currently supported:

 - %h default hostname from /etc/os-release
 - %i value of ID from /etc/os-release
 - %m last three octets of base MAC, e.g., c0-ff-ee

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-14 18:00:00 +02:00
Joachim Wiberg 7346f122fd confd: allow all container networks to set interface name
Unlock setting a custom interface name inside the container.  This aids
se-cases where this is needed and provide a better user experience, for
example when upgrading containers.  Not having to reboot the host just
to activate an upgrated container.

Fixes #708

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-14 18:00:00 +02:00
jovatnandGitHub 227b3a92a0 Merge pull request #702 from kernelkit/jovatn/test-spec-minor-fixes
Jovatn/test spec minor fixes
2024-10-14 08:12:20 +02:00
Jon-Olov Vatn 6d1ac9aad2 Minior fixes to Test Specs
Updating after comments from Axkar (thx!)

[skip ci]
2024-10-14 08:07:36 +02:00
Mattias WalströmandGitHub 53d90ae45a Merge pull request #707 from kernelkit/misc
Bump Finit and add support for dummy interfaces
2024-10-14 05:56:04 +02:00
Joachim Wiberg 411626a8b7 package/finit: bump to v4.8
Full ChangeLog at <https://github.com/troglobit/finit/releases/tag/4.8>

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-13 20:01:10 +02:00
Joachim Wiberg a4e6e4422b confd: add support for dummy interfaces
Dummy interfaces are useful for configuring routes and testing network
services without having to allocate physical or virtual interfaces.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-13 18:08:20 +02:00
Joachim WibergandGitHub 3358687c39 Merge pull request #695 from kernelkit/custom-phys-address 2024-10-11 18:30:36 +02:00
Joachim Wiberg 26180859bb doc: update changelog
Add issue #680, and all others that's gone in during the last week.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-11 16:41:21 +02:00
Joachim Wiberg 025c3ab7f6 doc: new setting on general interface settings
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-11 16:41:21 +02:00
Joachim Wiberg 026236390b doc: add picture to show stacking direction
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-11 16:41:21 +02:00
Joachim Wiberg 284f79242a doc: add missing VLAN block to overview svg
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-11 16:41:21 +02:00
Joachim Wiberg f79ad4d2d8 confd: handle static factory-config syntax error
For products with a static factory-config, or customers generating with
an older syntax, attempt migration in case of bootstrap failure.

Refactor logging to drop '-s'.  This prevents duplicate log messages
since bootstrap always runs after syslogd has started and all stdout
is always logged.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-11 16:41:21 +02:00
Joachim Wiberg 1852d12e7f confd: refactor 30-cfg-migrate for stand-alone use
This patch relocates the 30-cfg-migrate init script to confd, where it
belongs, renaming it migrate and installing into /usr/sbin.

The script has been heavily modified to be more user friendly, as well
as useful for automated restore operations, to be able to refresh old
backups to modern .cfg file syntax.

Example (injected phys-address error):

    admin@example:~$ migrate -c /etc/factory-config.cfg
    /etc/factory-config.cfg: has syntax error, requires migrating.

Since backups are created with the old confd sytanx version in the name,
the backup functionality has been kept in the script.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-11 16:41:21 +02:00
Joachim Wiberg 98ff33113a confd: bump version for phys-address .cfg migration
See issue #680

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-11 16:41:21 +02:00
Joachim Wiberg cc165c5bb9 confd: replace phys-address deviation with new setting
This commit replaces the ietf-interfaces deviation for phys-address,
used to set custom MAC address on interfaces, with a more flexible
approach which can calculate the new MAC address based on the device's
chassi MAC, with or without an added offset.

The regression test has been updated to test all variants.

Resolves: #680

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-11 16:41:21 +02:00
Tobias WaldekranzandGitHub 6e8f91ef3c Merge pull request #704 from kernelkit/defconfig-regression-fixes
Defconfig regression fixes
2024-10-11 16:37:44 +02:00
Joachim Wiberg 60b8f97ad6 package/test-mode: rename to confd-test-mode
Declare that confd-test-mode depends on confd, otherwise with 'select',
a call to `make update-defconfig` will remove BR2_PACKAGE_CONFD=y, which
we feel is very confusing -- in particular when comparing any defconfig
that does not have test-mode package.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-11 15:02:49 +02:00
Joachim Wiberg 8b75022696 configs: re-enable OpenSSL backend for libssh/libssh2
NETOPEER2 requries the OpenSSL backend of libssh.  By default, except on
minimal builds, is to use GCrypt backend.  Gcrypt is selected because of
Podman, which is not in the minimal builds.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-11 14:23:34 +02:00
Jon-Olov Vatn d74e7f1458 Fixing typos and other minor issues on test spec
[skip ci]
2024-10-11 13:53:41 +02:00
Jon-Olov Vatn 9baa3ac674 Add missing Readme.adoc files in test specs 2024-10-11 13:28:45 +02:00
Tobias WaldekranzandGitHub e8035f42fa Merge pull request #699 from kernelkit/r2s-fixes
Minor fixes for the R2S and similar boards
2024-10-11 08:47:28 +02:00
Joachim Wiberg 9a3f7d44c4 statd: allow ethtool rmon counters readout to fail
In e373398 we restored statd suport for checking for faults in yanger at
runtime.  This in turn broke CLI "show interfaces" support on the little
NanoPi R2S because ethtool cannot read counters in JSON format on it.

This patch catches the subprocess exception, allowing this particular
call to ethtool to fail with empty result.  The only difference from
before e373398 is that run_json_cmd() will log an error that ethtool
failed, for every interface it is called on.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-10 23:55:13 +02:00
Joachim Wiberg 374d24a547 configs: update and add LIBMNL to x86_64 targets
- Sync (make update-defconfig)
   - test-mode selects confd
   - gencert seclets openssl which in turn selects LIBSSH*_OPENSSL
   - rest is relocaations according to Config.in
 - Add LIBMNL to x86_64 targets, otherwise iproute2 does not install devlink

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-10 23:55:13 +02:00
Mattias WalströmandGitHub dc0a68a9eb Merge pull request #692 from kernelkit/update-tests
Update some tests
2024-10-10 11:26:11 +02:00
Mattias Walström f1d730447d confd: ietf-system: Add missing endspent() when getting operational data
This fix #697
2024-10-10 10:56:47 +02:00
Mattias Walström c0d5bfa71d test: add_delete_user: Test yescrypt 2024-10-10 10:56:47 +02:00
Mattias Walström 02100ef1f8 test: ospf_multiarea: Test interface type point-to-point and router-id
Test point-to-point on /30-links, verify the interface type
set explicit-router-id and verify that it gets set and sent
over OSPF.
2024-10-10 10:56:47 +02:00
Mattias Walström 00b103d3d2 tests: Update some typos in test steps
Also add missing ipv4_autoconf test from specification
2024-10-10 10:56:47 +02:00
Ahmed KaricandGitHub c44621b8be Merge pull request #693 from kernelkit/verify-ssh-key
Verify fetching data using ssh public key
2024-10-10 10:04:15 +02:00
Ahmed Karic b1bc7b42b4 test: Verify fetching data using ssh public key
Add a test case to verify that a new (guest) user can retrieve data
(i.e. syslog data) using ssh public key

Fixes #304
2024-10-09 19:21:01 +02:00
Joachim WibergandGitHub 6a036ec671 Merge pull request #691 from rical/cli-fix-iface-tabcompl 2024-10-08 18:01:07 +02:00
Richard Alpe 49c47e4732 cli: hide internal interfaces in tabcomplete
Don't show "internal" interfaces in "show interface name"
tab completion.

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-10-08 16:23:01 +02:00
Richard AlpeandGitHub 719fe709aa Merge pull request #690 from rical/fix-long-frr-uptime
yanger: handle all frr uptime formats
2024-10-08 13:43:45 +02:00
Richard Alpe 03245f3631 cli: print FRR uptime on same format as FRR
Use the same uptime representation as FRR does.

Example output:
DESTINATION            PREF NEXT-HOP   PROTO   UPTIME
>* 10.0.23.0/30        0/0 e6          direct  20:10:05
192.168.3.0/24         110/1 e2        ospfv2  5d13h05m
>* 192.168.3.0/24      0/0 e2          direct  01w1d13h

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-10-08 10:54:36 +02:00
Richard Alpe 950e868eb3 yanger: handle all frr uptime formats
FRR prints uptime different based on how long it is. Prior to this
commit yanger expected uptime to be on the format HH:MM:SS which it is
as long as it's shorter than a day. If it's longer the format changes,
this commit handles this.

The commit also adds unit test data triggering the different formats
(<day, <week, >week).

Side note:
cli-pretty could be made to represent the data on "FRR format" again,
which is perhaps more human friendly.

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-10-08 10:06:32 +02:00
Joachim WibergandGitHub 3e8e8a2e99 Merge pull request #689 from kernelkit/container-nftables 2024-10-07 21:04:57 +02:00
Mattias WalströmandGitHub d8655ef70d Merge pull request #688 from kernelkit/vlan-move-ports
Do not delete VLAN when change a port from tagged to untagged
2024-10-07 17:16:15 +02:00
Joachim Wiberg 458c1f8795 configs: include nftables container image in default builds
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-07 17:09:30 +02:00
Joachim Wiberg 5cbe92f9ec package/curios-nftables: new package
Allow bundling dedicated nftables container in Infix images.  With this
container, the /etc/nftables.conf can be kept as part of the device's
startup-config (base-64 coded binary format).  Highly useful in advanced
setups, either with dedicated interfaces in the container, or when run
in host network mode.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-07 17:09:30 +02:00
Mattias Walström 2a5ed84898 Do not delete VLAN when change a port from tagged to untagged
Dagger did delete of the VLAN after it had configured it.
Resulting in that the new VLAN configuration was lost.

This will first delete all untagged/tagged ports that should be removed,
when they are removed, add the new or changed ports.
2024-10-07 16:19:38 +02:00
Joachim Wiberg 6743223b29 package/curios-httpd: install unmodified OCI tarball in image
Before:

    $ ls -lah output/target/lib/oci
    drwxr-xr-x  2 jacky users 4,0K Oct  7 12:26 .
    drwxr-xr-x 27 jacky users  20K Aug 29 06:45 ..
    -rw-r--r--  1 jacky users 1,8M Oct  7 12:19 curios-httpd-v24.05.0.tar.gz

After:

    $ ls -lah output/target/lib/oci
    drwxr-xr-x  2 jacky users 4,0K Oct  7 12:26 .
    drwxr-xr-x 27 jacky users  20K Aug 29 06:45 ..
    -rw-r--r--  1 jacky users 281K Oct  7 12:28 curios-httpd-v24.05.0.tar.gz

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-07 14:01:18 +02:00
Mattias WalströmandGitHub a66d1d3771 Merge pull request #684 from kernelkit/fix-test-texts
Update last tests for first version of test specification
2024-10-04 13:12:44 +02:00
Mattias Walström 65e5ab81f1 test: ietf-system: Update topology images 2024-10-04 11:22:58 +02:00
Mattias Walström 6cceecccda test: Update infix-dhcp for test specification 2024-10-04 11:22:58 +02:00
Mattias Walström a5e4e016e4 test: Update infix-services for test-specification 2024-10-04 11:22:58 +02:00
Mattias Walström 883123ecdd test: Update misc/operational_all for test specification 2024-10-04 11:22:58 +02:00
Mattias Walström 69ba9110fc test: Update infix-container for test specification 2024-10-04 11:22:58 +02:00
Mattias Walström 5a28a5611a test-specification: Make possible to add ASCII art
The ASCII art over the topology must be surrounded by .... and
is codeblock in ASCIIdoc. Since this is only used for ASCII arts
to help describe tests, border and background are white.
2024-10-04 11:22:58 +02:00
Ahmed KaricandGitHub 571f4a6b9c Merge pull request #683 from kernelkit/upgrade-netconf-client
Upgrade NETCONF Client from 2.2.0 to 3.1.1
2024-10-03 18:38:56 +02:00
Ahmed Karic 4bed63d310 test/infamy: update get_data
Refactor NETCONF functions (get_data) to accommodate the upgrade
in the netconf_client library within the Docker container image.

Fixes #390
2024-10-03 17:23:18 +02:00
Ahmed Karic 093a17234f test/docker: upgrade netconf-client in docker image 2024-10-03 17:23:18 +02:00
Joachim Wiberg a50edc7bcb .github: fix internal Markdown link
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-03 11:51:47 +02:00
Joachim WibergandGitHub b946ea937c Merge pull request #682 from kernelkit/drop-sync-job
Drop sync job in favor of local cronjob

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-03 10:51:20 +02:00
Joachim WibergandGitHub 515f1e60f9 Merge pull request #681 from kernelkit/contrib
Major update of CONTRIBUTING.md

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-03 10:30:50 +02:00
Joachim Wiberg 39da7f4509 .github: update support resources document
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-03 10:21:55 +02:00
Joachim Wiberg f2c60f2e16 .github: drop sync job in favor of local cronjob
[skip ci]

Resolves: #572

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-03 10:01:06 +02:00
Joachim WibergandTobias Waldekranz fb3bd858e1 .github: major overhaul of CONTRIBUTING.md
This major overhaul of the Contributing to Infix document is made both
for internal (scaling the core team) reasons and to make it easier for
external contributors to undertand what is expected:

 - For bug reporting
 - For feature requests
 - When submitting a patch
 - When adding a complete new subsystem
 - Etc.

Resolves: #672

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Co-authored-by: Tobias Waldekranz <tobias@waldekranz.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-03 08:57:54 +02:00
Joachim Wiberg ba84c36878 doc: add separate png for Jack
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-03 08:40:11 +02:00
Mattias WalströmandGitHub 3b17dd013b Merge pull request #679 from kernelkit/fix-test-texts
Misc fixes
2024-10-03 08:10:27 +02:00
Mattias Walström 9fb2b57dd6 Add all issues to project Infix&co when new issue is opened 2024-10-03 07:28:33 +02:00
Mattias Walström 363516ce58 Update changelog for upcoming 2024.10.0 release 2024-10-03 07:28:33 +02:00
Mattias Walström 673ce2767f Do not allow to configure a loopback interface in multiple areas 2024-10-03 07:28:33 +02:00
Mattias Walström b88c3c3a0c ospf: Do not enable BFD on all interfaces when enable on one interface 2024-10-03 07:28:33 +02:00
Mattias Walström ff6c63a3bd test: ospf: Remove loopback from multiple areas
This is not allowed in FRR.

Fix #586
2024-10-03 07:28:33 +02:00
Mattias Walström 6c2e5542ca confd:yang: Refactor infix YANG file names and location
Instead of renaming the yang-file instead we keep the yang file
with the actual content linear, easier to review and easier to
follow changes. This only applies on all infix models,deviations
and auguments.

The actual infix-system@2038-01-19.yang is just a symlink to
ietf-system.yang which contains all the code.
2024-10-03 07:28:33 +02:00
Mattias Walström ca122ea093 test:case:usb: Update test documentation 2024-10-02 23:31:14 +02:00
Mattias Walström 2341e076a8 factory-config: Add default NACM deny rule for reading password hash
This fix #499
2024-10-02 23:31:14 +02:00
Mattias Walström 0d98ee5716 test-spec: Fail build on failed test specification build
This can fail on two ways:
* Generate topology files
  Unfortunatly the python-graphwiz has no way of detect faults
  it just show 'Warning' on stderr, catch it and if != empty, exit 1

* Generate pdf
  Here the default error level was FATAL, but for example a file
  that is included does not exist it just show an error on stdout.
  the error level is now INFO, it should always be silent.
2024-10-02 23:31:14 +02:00
Mattias Walström 7871bdb9f4 veth_delete: Update for test specification 2024-10-02 22:58:06 +02:00
Mattias Walström 64c51c7c94 test: verify_all_interface_types: Update to generate correct test specification 2024-10-02 22:58:06 +02:00
Mattias Walström 19d40af20a syslog: Update test texts for test specification 2024-10-02 22:58:06 +02:00
Tobias WaldekranzandGitHub b21945f38a Merge pull request #674 from rical/yanger-hide-internal-interfaces
yanger: hide internal interfaces
2024-10-01 22:20:31 +02:00
Tobias WaldekranzandGitHub 712780fd5a Merge pull request #675 from rical/fix-flaky-routing-test
test: use static time in ietf-routing unit tests
2024-10-01 21:57:21 +02:00
Mattias WalströmandGitHub 48722e551e Merge branch 'main' into fix-flaky-routing-test 2024-10-01 20:12:51 +02:00
Tobias WaldekranzandGitHub 14234a9a77 Merge pull request #677 from kernelkit/uboot-improvements
Uboot improvements
2024-10-01 16:42:55 +02:00
Richard Alpe f932f98ad2 test: use static time in ietf-routing unit tests
Fix flaky ietf-routing unit tests.

Prior to this patch, there was a unit-test race between Yanger
(sysrepo emulator) and cli-pretty, where the local system time could
change between crafting the data and printing it. This caused the CLI
output to change and the ietf-routing unit test to fail.

Fixes #668

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-10-01 16:34:58 +02:00
Tobias Waldekranz a127925d9e uboot: Add leading slash to path when using HTTP
RFC 7230, section 5.3.1 specifies that the path must start with a
slash.

...and nginx is not amused by its absence.
2024-10-01 16:00:38 +02:00
Joachim Wiberg 63c1f36005 doc: minor, fix syntax in example
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-01 14:47:39 +02:00
Richard Alpe 707e7d1a29 yanger: skip internal interfaces
In "14128047e18d statd: remove nl code and improve speed" the handling
of all interfaces where moved from statd to Yanger. This means statd no
longer tracks interfaces using Netlink, but instead relies on Yanger
to recognise and list all interfaces in the system. In the midst of
this change the ignoring of "internal" interfaces where lost.

In this commit we reintroduce this logic in Yanger and add a test case
that ensures internal interfaces isn't listed.

Fixes: 14128047e1 statd: remove nl code and improve speed

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-10-01 14:28:31 +02:00
Richard Alpe 240a292725 test: remove explicit iface list from sysrepo emulator
Yanger now has the ability to loop all interfaces (based on ip link),
this means we can run once for all interfaces.

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-10-01 14:28:30 +02:00
Richard Alpe e2fed7c9de yanger: redesign ip interface data collection
Run ip link and ip addr once and handle the interface selection in
Yanger. This should be faster on systems with many ports and it
simplifies the CLI test files.

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-10-01 14:28:26 +02:00
Joachim WibergandGitHub 19563c00f4 Merge pull request #669 from kernelkit/doc-updates
doc: expand on static vs dynamic factory-config
2024-10-01 11:44:50 +02:00
Joachim Wiberg d37656e347 doc: expand on static vs dynamic factory-config
Infix now supports static /etc/factory-config.cfg from a rootfs overlay
or /usr/share/product/<VPD.PRODUCT>/etc/factory-config.cfg in addition
to the autogenerated /run/confd/*-config.gen files.

Update the Branding & Releases document with a bit more information on
this rather complex topic.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-01 11:43:45 +02:00
Tobias Waldekranz 69b93507a9 uboot: Honor static network settings
If the user has manually configured all required network parameters,
honor that setup, by skipping DHCP, and directly fetch the image.
2024-10-01 09:53:37 +02:00
Tobias Waldekranz e3e6477d47 uboot: Skip bootmenu when in developer mode
When a device is in developer mode, drop the user directly into the
shell instead of having to go via the bootmenu, since this is usually
what you want in that case. Emit a note about how to access the menu,
for the rare cases when that is needed.
2024-10-01 09:53:37 +02:00
Joachim WibergandGitHub 808a04f125 Merge pull request #667 from kernelkit/gh-dl-artifact-fixes
Support downloading artifacts from release builds
2024-09-30 17:02:05 +02:00
Tobias Waldekranz fb8ac2aca1 utils/gh-dl-artifact.sh: Support extracting release tarballs
Release tarball names contain the version information. Make sure we
find these files when extracting them from the artifact ZIP.
2024-09-30 13:34:36 +02:00
Tobias Waldekranz 6dadbd9176 utils/gh-dl-artifact.sh: Look for artifacts in all runs
Previously, the assumption was that the artifact could be found in the
first run of "Bob the Builder". This does not hold in the case when:

1. An initial run is aborted, and is re-run at a later date
2. When a release is built (by "Release General")
2024-09-30 13:19:54 +02:00
Ahmed KaricandGitHub 3c1dc9be53 Merge pull request #666 from kernelkit/update-qeneth-submodule
test/qeneth: Update submodule
2024-09-30 13:12:24 +02:00
Ahmed KaricandAhmed Karic 1531688ac4 test/qeneth: Update submodule
Fixes #660
2024-09-30 13:11:59 +02:00
Joachim Wiberg a4d4d7e4ae doc: update release date for v24.09
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-30 10:30:25 +02:00
Tobias WaldekranzandGitHub 1adace8acb Merge pull request #664 from kernelkit/styx-rename
board/aarch64: styx: Update board name
2024-09-30 10:24:06 +02:00
Tobias Waldekranz 059e22c85f board/aarch64: styx: Update board name
Now that the name question has been settled, call the board by its
proper name. Provide symlinks to keep older bootloaders happy.
2024-09-30 09:28:08 +02:00
Joachim WibergandGitHub 58edaf371c Merge pull request #657 from addiva-elektronik/verify_all_interface_types 2024-09-28 09:11:41 +02:00
Ahmed Karic d2ff58a170 test: add a test to verify all interfaces
The test ensures that all interface types can be successfully created
and retrieved from the operational datastore. It also functions as a
regression test for issue #618 and will apply to all future interface
variants.

Fixes #622
2024-09-27 17:53:48 +02:00
Joachim WibergandGitHub 40e4b168ff Merge pull request #661 from kernelkit/veth-delete
Fix test issues after adding veth-delete test

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-27 17:40:30 +02:00
Joachim Wiberg bac957d1bf cli: minor, fix tcpdump permissions from exec as admin
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-27 16:55:24 +02:00
Joachim Wiberg 015946219b confd: fix possible NULL ptr deref
Introduced in 35eeae55.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-27 16:43:42 +02:00
Joachim Wiberg 6521de28e7 confd: check for control-plane-protocol before migration
Refactor 0f9d429 to first check if the .cfg file has any routing
protocol active before converting the type's value.

This fixes a regression in the release cycle that otherwise would
cause a fresh startup-config, created from a plain factory-config
from v24.08, to be converted to an empty file.

Inspired by this fix, the same mitigation, albeit highyl unlikely,
has been applied to the v1.0 user shell type migration.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-27 16:37:16 +02:00
Joachim Wiberg c0a79c3e00 test: return None instead of 404 Exception for missing XPaths
Fixes to following exception calling iface.interface_exist(target, veth0): requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://[fe80::2a0:85ff:fe00:201%d2a]:443/restconf/ds/ietf-datastores%3Aoperational/ietf-interfaces%3Ainterfaces/interface=veth0a/name

Removing interface veth0a, and then checking operational if it has been
properly removed, should not cause an exception.  Better to return None
object instead.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-27 16:37:16 +02:00
Joachim Wiberg acb844336f doc: update ChangeLog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-27 13:22:38 +02:00
Joachim Wiberg c8437f040a test: verify VETH pairs can be removed
Verify a VETH pair can be removed after a couple of dummy operations to
step the dagger generation past the initial where the pair is created.

NOTE: Infamy currenly lacks support for removing chunks of configuraion
      e.g., a dut.del_config_dict(), or similar, and delete_xpath() is
      not valid for configurations with dependencies like VETH pairs.

Issue #658

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-27 13:08:26 +02:00
Joachim Wiberg 54a046afb4 test: check if JSON data before searching it
Fix None.get() value assertion for missing data.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-27 13:02:59 +02:00
Joachim Wiberg 35eeae55f4 confd: skip veth peer also when deleting interfaces
When adding interfaces over NETCONF/RESTCONF, confd has a check to
ensure the peer end is skipped, since creating one end also create
the other.

This patch adds the corresponding skip when deleting a VETH pair.

Fixes #658

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-27 13:00:02 +02:00
Joachim Wiberg a06436a8c8 .github: fix missing arch + version in legal-info tarball
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-27 08:44:36 +02:00
Joachim Wiberg ecc1e24ba9 board/common: bundle helpful README in release tarballs
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-27 07:54:45 +02:00
Joachim Wiberg e4fddb6875 doc: update ChangeLog with release news
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 20:38:41 +02:00
Joachim WibergandGitHub 5bd8e99282 Merge pull request #639 from kernelkit/ipv4ll-request-address
IPv4 autoconf request-address support

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 16:41:10 +02:00
Joachim Wiberg d9fa4d9898 doc: update ChangeLog with info on route installation overhaul
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:55:46 +02:00
Joachim Wiberg 8b60ddf70a doc: update static routing and add route pref section
This patch mainly updates the static routing chapter, and adds a new
section on route preferences, but it also makes slight touch-ups at
a few other places as well.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:55:46 +02:00
Joachim Wiberg 1101d30396 doc: break out testing requriements from devguide
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:55:46 +02:00
Joachim Wiberg 5aed8e0488 test: update specifications
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:55:46 +02:00
Joachim Wiberg dc1a2c39e8 test: update with static route canary
Now that all routes acquired from DHCP (and ZeroConf) are installed in
the kernel FIB via Frr (staticd -> zebra -> kernel), instead of directly
to the kernel FIB, let's extend this test slightly.

Add a canary static route that is installed before the DHCP client is
even started.  This canary route should be installed along with the
DHCP (classless) route(s) when the interface comes up and acquires a
DHCP lease.

We take this opportunity to also verify that the route-preference is
properly carried over from test to operational RIB status.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:55:46 +02:00
Joachim Wiberg 8ea0af6385 test: refactor infamy route helpers
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:55:46 +02:00
Joachim Wiberg ae76030e70 test: update cli output reference for "show ip route"
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:55:46 +02:00
Joachim Wiberg 7ac016b536 test: refactor test for running on hardware test bed
Also, add some logs to track progress.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg b61398103c statd: adjust "show ip route" column widths per address proto
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 752b1f4a94 confd: add support for setting preference on static routes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg dd3f1c39d1 confd: expand route info in operational data
- Enable OSPF route metrics in RIB, only defined for OSPF
 - Enable 'active' route flag for RIB, same as 'selected >' in FRR
 - Enable 'last-updated' route field for RIB, used for uptime
 - Augment route in RIB with 'installed' flag, same as 'FIB *' in FRR

The CLI "show ip route" command has been updated accordingly.  The
classic Cisco style output has been kept instead of separating the
routes into Active and Backup, as discussed previously.  Because
when inspecting large route sets you want to compare same prefix
vs distance/metric to understand why a certain route is selected.

admin@example:/> show ip route
   PREFIX                            PREF  NEXT-HOP                      PROTOCOL      UPTIME
>  0.0.0.0/0                          1/0  192.168.0.42                  static        0h2m6s
 *                                         192.168.122.1
   0.0.0.0/0                          5/0  192.168.122.1                 static        0h2m6s
   0.0.0.0/0                        254/0  e1                            static        0h2m6s
>* 169.254.0.0/16                     0/0  e1                            direct        0h2m6s
>* 192.168.0.0/24                     1/0  192.168.122.1                 static        0h2m6s
>* 192.168.122.0/24                   0/0  e1                            direct       0h2m12s

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 35276cb2e8 confd: rename ietf-routing prefix, ietf-r: -> rt:
For consistency with the other IETF routing models, e.g., OSPF, let's
use the same model prefix for internal references.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 2063c94f42 confd: drop deviation for /if:interfaces-state
Not the most obvious patch, but let me explain -- there will always be a
conflict betweem usability and "maintainability".  The ietf-interfaces
yang model already declares /interfaces-state as deprecated, so we don't
really need to add a deviation 'not-supported', for usability, however,
it may be useful since the deviation helps cut out that tree completely.

While working with ietf-routing and our companion models, I found that
since it relies on ietf-interfaces, it also breaks the reload/reimport
of infix-routing while developing extensions/changes:

  $ lint.sh -f tree ieee802-* iana-if-type@2023-01-26.yang \
            ietf-interfaces@2018-02-20.yang \
	    infix-interfaces@2024-01-15.yang \
	    ietf-routing@2018-03-13.yang \
	    ietf-ipv4-unicast-routing@2018-03-13.yang \
	    ietf-ospf@2022-10-19.yang \
	    infix-routing@2024-09-22.yang
  libyang err : Not found node "interfaces-state" in path. (Schema location "/ietf-routing:routing-state/interfaces/interface".)
  libyang err : Target of leafref "interface" cannot be referenced because it is disabled. (Schema location "/ietf-routing:routing-state/interfaces/interface".)
  YANGLINT[E]: Parsing schema module "ietf-routing@2018-03-13.yang" failed.

The only way to change/update models for a given build is to either, a)
surgically remove offending models from output/target/, then reinstall
all dependencies and hope it works better, or b) rebuild from distclean.
In most cases you end up with alternative b).

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 0ea84cf557 test: minor, whitespace and PEP-8 fixes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 6e85ace4b0 test: update rib source protocol, infix-routing -> ietf-ospf
Latest YANG model change reverts back to using the IETF routing-protocol
type.  Update tests to check for infix-routing:ospf -> ietf-ospf:ospfv2.

Also, refactor and extend infamy/route.py:_exist_route() slightly for
readability and PEP-8, as well as to use an optional model prefix also
for next-hop-list addresses.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 76e54420a2 confd: minor, fixes & cleanup
- Straighten out formatting issues in ospfd.conf (debug)
 - Simplify and reduce code duplication
 - Avoid 'restart zebra' errors in runlevel S

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg f65000f29e board/common: update mg default configuration file
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02: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 118dcd4b35 statd: read system routing table from vtysh intead of kernel
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg d33249512e statd: slight refactor of ospf-status
- Ignore stderr output (ospfd not running)
 - Import run_json_cmd() from yanger
 - Ensure deafault empty object + arrays

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg d5418b019f confd: switch back to ietf type for route source-protocol
With the redesign of the operational rib routes, using vtysh 'show ip route'
instead of the kernel 'ip route' as source, we no longer need the infix source
protocol.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg cf0cfc2dad confd: clarify route preference in DHCP client model
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 445ca0a9d6 board/common: restore 'show' script from 493be97 sync with present
The intention is to provide a similar set of commands as klish
admin-exec.  However, instead of trying to make the Linux tools
more accessible, we now make the Infix tooling more accessible.

E.g., instead of "show ip route" mapping to "ip route show", we
map it to:

sysrepocfg -f json -X -d operational -x "/ietf-routing:routing/ribs" | \
      /usr/libexec/statd/cli-pretty "show-routing-table"

As a spin-off we alos get a much more readable infix.xml for klish:
 - Relocate logic to shell script wrapper 'show'
 - Introduce Cisco style "show ip route" and "show ipv6 route"

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg d575538d4a statd: minor, pep8 fixes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 84c373ef63 statd: refactor metric in 'show routes' to distance/metric
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg cc8e31f74f board/common: adjust metric on IPv4LL and DHCP routes to match Frr
Apply a distance adjustment to routes retrieved from IPv4LL/ZeroConf and
DHCP to ensure that Frr (Zebra) can compare other protocol routes, e.g.,
static.  Without this Frr will consider all routes read from the kernel
to have a protocol distance of 0, meaning better than static routes that
have a distance of 1.

Initial proposal to fix issue #640

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg fd8826c3f1 confd: initialize sysrepo startup datastore at boot
Since /etc is not retained across reboots, the sysrepo startup datastore
is not used to bootstrap the Infix.  Instead, /cfg/startup-config.cfg is
used and loaded directly to the running datastore.

For some use-cases when operating directly on sysrepo this causes a lot
of confusion because startup == factory ds until any user calls the CLI
command `copy running-config startup-confg`.

This patch fixes this initial "glitch" by loading the starup datastore
at boot on successful loading of startup-config to unning.

To prevent any unintentional "auto-save" of, e.g., failure-config to
startup-config, we make confd aware of this "sync" operation during
bootstap.

Fixes #625

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 430948df06 confd: minor, fix global variable shadowing warnings
Follow-up to cfd95dc30, which made 'struct confd confd' a global
variable in core.h.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 0a06fc0571 confd: minor, logging and coding style
- Remove duplicate logs due to logger logging also to stderr
 - Fix coding style in new test-override-startup code path

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg e483d295da statd: also silence JSONDecodeError on check=False
In d616623a an attempt to silence bogus return values from mctl, when
multicast snooping is disabled on a bridge.  That helped get data back
for operational to produce `show interfaces` *with* a bridge and ports
but still emitted bogus log warnings.

This patch addresses that by checking 'check' on JSONDcodeError as well
before emitting any log error.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 10ef7c5fda doc: update ChangeLog with recent IPv4LL (autoconf) changes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 476c2ebe40 test/case: update ipv4-autoconf with new test passes
- Add check for specific 169.254/16 adddress (new feature)
 - Add check for disabling autoconf on interface (regression test #638)

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg ec6d350bc1 test/infamy: minor, check return value, and pep8 fixes
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 151119ef0e patches/avahi: fix address cleanup on avahi-autoipd exit
Fixes #638

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 4ed4fa5052 board/common: simplify avahi-autoipd.action script
- We know we always have iproute2 tools
 - We only use one ipv4ll client per interface, so UNBIND can be
   simplified to flush ifname:avahi
 - Log all events handled by script for troubleshooting

Note: on BIND event we may be called without first getting UNBIND on
      previous address, hence the flush there too.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg af1a86f10a board/common: reactivate scp/sftp and drop non-working cli subsystem
The sftp subsystem was lost in 61213c7.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 9079c55944 doc: minor, grammar and slight clarification of example
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Joachim Wiberg 6b37a7dd7c doc: Update ChangeLog with major package upgrades
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-26 15:49:45 +02:00
Mattias WalströmandGitHub c39a63e181 Merge pull request #656 from kernelkit/upgrade-rousette
Upgrade rousette and required CPP-bindings
2024-09-26 15:48:25 +02:00
Mattias Walström 5461a443a3 Upgrade rousette and required CPP-bindings
First release of rousette.
2024-09-26 15:05:38 +02:00
Tobias Waldekranz 057d255179 test: Disable services_basic
As detailed in the comment, we disable this test pending a fix for
2024-09-26 12:32:13 +02:00
Richard AlpeandJoachim Wiberg e3733982ed statd: never hide yanger faults
This is basically a functionally revert of:
435c5ca9 statd: allow ethtool --json to fail without breaking operational ds

Having a fail flag that hides all yanger faults is too big of a
hammer. If some hardware doesn't support a particular command such as
"ethtool --json" it should be handled gracefully by yanger. Perhaps by
catching the error and returning an empty dataset for that node.

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-09-25 17:29:20 +02:00
Richard AlpeandJoachim Wiberg 5d0f85cb07 statd: fix callback debug
Debug print the full xpath in all callbacks.

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-09-25 17:29:20 +02:00
Richard AlpeandJoachim Wiberg 83567c7e17 statd: move yanger args to caller
A non functional change. The caller knows more about how to format the
args, so it makes more sense to build the Yanger cmdline from the
caller.

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-09-25 17:29:20 +02:00
Richard AlpeandJoachim Wiberg 14128047e1 statd: remove nl code and improve speed
This is a major redesign of statd interface handling. The goal here is
to reduce the time it takes for statd to produce operational data for
all interfaces on larger iron. Which manifested itself most notably in
the CLI command "show interfaces".

This patch removes the netlink interface subscriptions done by the
statd c code. Instead statd now subscribes to the ietf-interfaces
base path which means it will be invoked for all interfaces.
If the user (sysrepo) has specified an explicit interface name such as
eth0, it will be extracted by statd and passed down to Yanger.

This patch also modifies Yanger to fit this new modus. No explicitly
passed interface name now means all interfaces.

Side note:
The main culprit of the slow operational interface data is the time it
takes to bootstrap python. Which prior to this patch was done for each
interface. On the HW system I'm testing this patch on, runtime is
reduced by a factor of 10.

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-09-25 17:29:20 +02:00
Mattias WalströmandJoachim Wiberg 3e2b9fbd5e Build test specification on build
Also include the test specification in release tarballs.
2024-09-25 17:26:40 +02:00
Mattias Walström a857fa64f8 Changelog: Update changelog for 2024.09 release
Add fixed issues #635 and #648
2024-09-25 11:32:45 +02:00
Mattias Walström 33ad72b718 test: case: interfaces: Adapt tests to fit the test specification
Mostly text fixes but major rewrite in some tests.
2024-09-25 11:32:45 +02:00
Mattias Walström 7089f67da9 OSPF: Fix issue where all neighbors in the area where show on all interfaces
This fix #635
2024-09-25 11:32:45 +02:00
Mattias Walström aefaf94244 Bump linux kernel to 6.6.52 2024-09-25 11:32:45 +02:00
Mattias Walström a3a0d1a731 test: Remove obsolete test iface_status
Not needed, since it only verify the kernel is doing its thing.
2024-09-25 11:32:45 +02:00
Ahmed KaricandAhmed Karic 86c562d3b3 test: introduce image test-mode within the test environment
- The test mode, introduced at the config/build phase (commit 241f3f2),
causes the device to start in test-mode when used in GNS3 (or other
environments). This has unintentionally become the default
configuration for the image, which is not desirable and is only
acceptable for the Infix test system. With this update, the original
configuration is preserved, and the test mode is applied only within
the test environment.

- Align the 'dual' topology to use the same template as 'quad'

Fixes #603
2024-09-23 15:35:21 +02:00
Ahmed KaricandAhmed Karic df97c61ad6 test/docker: add e2tools
e2cp is needed for injecting test-mode file into the disk image
2024-09-23 15:35:21 +02:00
Ahmed KaricandAhmed Karic 621e76c925 Revert "board/common: introduce image test-mode"
This reverts commit 241f3f224f.
2024-09-23 15:35:21 +02:00
Mattias WalströmandJoachim Wiberg 0f9d429d9b confd: bump and add a migrate script for infix-routing 2024-09-21 08:47:02 +02:00
Mattias WalströmandJoachim Wiberg ef81abeae2 configuration migrate: Remove duplicate infix-meta:version when migrate config
when migrate configs the yang data produced was this:
  "infix-meta:meta": {
    version: "1.0"
    "infix-meta:version": "1.1"
  },

duplicate node, resulting in failed migration of startup configuration, always replace
whole node.
2024-09-21 08:47:02 +02:00
Mattias WalströmandJoachim Wiberg 4083fbf4c5 routing: Add a infix-routing-type to only support selected protocols
Today Infix only support OSPFv2 and Static routes, this hides all other
protocols in the CLI and makes it clearar about what we support in the YANG
model.
2024-09-21 08:47:02 +02:00
Mattias WalströmandJoachim Wiberg 948d029062 test: case: ietf_routing: Update test texts for test specification 2024-09-21 08:47:02 +02:00
Tobias WaldekranzandJoachim Wiberg 7d1a708274 board/aarch64: styx: Remove unconnected LED
Only one (green) LED per port is available.
2024-09-19 14:27:22 +02:00
Tobias WaldekranzandJoachim Wiberg c263ff102d board/aarch64: styx: Trivial cleanup in dts
Require an explicit addr-of when using GSWP, which makes it clearer
for a reader that the argument passed is a node reference.
2024-09-19 14:27:22 +02:00
Tobias WaldekranzandJoachim Wiberg cbd615ec78 board/aarch64: styx: Revision B Support
The rewiring of the backplane in revision B necessitates two distinct
device trees.

Co-developed-by: Henrik Nordström <henrik.nordstrom@addiva.se>
2024-09-19 14:27:22 +02:00
Tobias WaldekranzandJoachim Wiberg 8d94508a99 package/rousette: Addmissing select of date-cpp
Shows up when building aarch64_minimal_defconfig.
2024-09-18 18:32:03 +02:00
Henrik NordströmandJoachim Wiberg 508ff29c71 bug: Add missing " in date-cpp package reference 2024-09-18 18:31:12 +02:00
Mattias Walström a533b87ea4 test: case: Move infix_interfaces into ietf-interfaces
This is how all other models are handled, the topmodel is naming the
test directory
2024-09-17 08:27:23 +02:00
Mattias Walström c8d87b9060 test: case: Update some toplogy PNG files 2024-09-17 08:27:23 +02:00
Mattias Walström c78bde298a doc: develop: Add autoconf and automake as requirement 2024-09-17 08:27:23 +02:00
Mattias Walström a360395a0a Remove silent lock for login shell bash/sh on non-admin users
Added some security information in YANG model, and it is now
up to the system administrator to handle potential security
issues.

This fix #616
2024-09-17 08:27:23 +02:00
Mattias Walström 900c5b0b2f test: case: ietf_system: Update test texts
And some changes in test semantics.
2024-09-17 08:27:23 +02:00
Mattias Walström 35a909edf0 test: infamy: Make possible to override username and password
This is now possible for SSH/RESTCONF/NETCONF, most useful with
SSH and adding/modify users.
2024-09-17 08:27:23 +02:00
Ahmed KaricandMattias Walström be6554f327 test: update infix-interfaces topologies 2024-09-16 14:20:52 +02:00
Ahmed KaricandMattias Walström 1637b22979 test: update ietf-interfaces topologies 2024-09-16 14:20:52 +02:00
Ahmed KaricandMattias Walström 3a8bede611 test: update infix-containers topologies 2024-09-16 14:20:52 +02:00
Ahmed KaricandMattias Walström 935c5e1af9 test: update ietf-hardware topologies 2024-09-16 14:20:52 +02:00
Ahmed KaricandMattias Walström a03465c249 test: update infix-services topologies 2024-09-16 14:20:52 +02:00
Ahmed KaricandMattias Walström cbe7c7f033 test: update misc topologies 2024-09-16 14:20:52 +02:00
Ahmed KaricandMattias Walström 7a29dbf419 test: minor update in infamy/topologies 2024-09-16 14:20:52 +02:00
Mattias Walström 895a790d57 Bump netopeer2, libnetconf2, libyang and sysrepo 2024-09-16 12:43:33 +02:00
Mattias Walström 710f6b82ce Upgrade linux kernel to 6.6.51 (LTS) 2024-09-16 12:43:33 +02:00
Joachim Wiberg 637e2d6692 buildroot: bump to 2024.02.6
2024.02.6, released September 9th, 2024

Important / security related fixes.

 Added a large number of additional runtime tests.

 Infrastructure:
 - Be more robust against text files (for package hashes and
   users) incorrectly missing a terminating newline.

 - Fix various issues with the pkg-kconfig infrastructure and
   per-package-directories builds
   (BR2_PER_PACKAGE_DIRECTORIES).

Updated/fixed packages: aer-inject, am335x-pru-package,
apache, apr, apr-util, attr, boost, btrfs-progs, busybox,
cryptsetup, dropbear, elfutils, fetchmail, ffmpeg, fluidsynth,
freerdp, gcc, gdb, gnutls, gpsd, hiawatha, hostapd, htop,
intel-microcode, iperf3, ksmbd-tools, libcoap, libcurl,
libest, libgtk3, libpwquality, libressl, libupnp, libxml2,
libxslt, lrzsz, mdio-tools, micropython, mjpg-streamer, mpir,
ncftp, nginx, nodejs, open-iscsi, openldap, openvpn, pistache,
procps-ng, python-django, ruby, speex, swaybg, tinyssh,
uclibc, uclibc-ng-test, unbound, uuu, wpewebkit, zfs

 Issues resolved:
- Toolchain (host-gcc-final-14.1.0) build failure with
  y2038/BR2_TIME_BITS_64 enabled
  https://gitlab.com/buildroot.org/buildroot/-/issues/16

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-16 08:03:47 +02:00
Joachim Wiberg e4119be1e2 doc: update ChangeLog with fixes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-13 16:31:39 +02:00
Joachim Wiberg 32f3db41b6 doc: adjust ChangeLog entry, issue fixed in v24.09, not v24.04
Follow-up to cfd95dc3

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-13 16:31:39 +02:00
Joachim Wiberg 0f6cbe9d30 doc: minor update, missing period + grammar
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-13 16:31:39 +02:00
Joachim Wiberg db136bce32 Fix container upgrade regression
In 0edc2d5 and afbe5ca, just prior to v24.06.0-rc1, support for deleting
containers in the background was added.  However, this also broke support
for upgrading containers.

In afbe5ca the start script for containers was renamed from NAME.sh to
S01-NAME.sh, but the container wrapper script's upgrade command was not
updated.  Neither was the cleanup and post-hook callbacks in confd!  So
when a container had been added to the system, the cleanup callback just
simply deleted the script, preventing it from being recreated at ugprade

This patch fixes the container identification code and also refactors
the execd code to ensure that kill scripts (for deleting in background)
and start scripts are run in the proper order *and* ensuring that execd
also does not accidentally remove the container start script.

Some cosmetic changes to the output at upgrade have also been added.

Fixes #623

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-13 16:31:39 +02:00
Joachim Wiberg 3003044601 board/common: add container --net IFNAME locate
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-13 16:31:39 +02:00
Joachim Wiberg b6472766b1 board/common: spellcheck path to downloaded OCI files
Check correct path for downloaded container images.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-13 16:31:39 +02:00
Joachim Wiberg d616623a8e statd: silence bogus log warnings
With a basic bridge setup, which has multicast snooping disabled by
default, `show interfaces` cause the following bogus log messages:

Sep 13 07:08:35 yanger: Command '['mctl', 'show', 'igmp', 'json']' returned non-zero exit status 1
Sep 13 07:08:35 yanger: Command '['mctl', 'show', 'igmp', 'json']' returned non-zero exit status 1
Sep 13 07:08:35 yanger: Command '['mctl', '-p', 'show', 'igmp', 'json']' returned non-zero exit status 1

Add a quiet flag to the run methods and set quiet=True for all mctl
commands to silence these log messages.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-13 16:31:39 +02:00
Joachim Wiberg 685b04d7cc cli: show configured name servers in 'show dns' command
Before we add proper operational support for DNS and NTP, we can at
least improve on the built-in CLI commands.

Issue #510

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-13 16:31:39 +02:00
Joachim Wiberg 063ef91f8d cli: fix regression in tab completion of 'container shell ...'
Only administrators are allowed to work with containers, allow them to
perform tab completion of all admin-exec commands as well.

Fixes #613

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-13 16:31:39 +02:00
Joachim Wiberg a8cf1a853c statd: add missing default {} when snooping is disabled
When multicast snooping is disabled on a bridge, mctl will exit with a
non-zero return code.  Default to {} for these cases so that the bridge
and its ports are properly returned by yanger.

Fixes #618

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-13 16:31:39 +02:00
Jon-Olov VatnandMattias Walström cfa9c74ef4 Updated Changlog for deviation fixes in infix-routing.yang 2024-09-13 14:46:34 +02:00
Jon-Olov VatnandMattias Walström 54ad3f82c5 Adding deviations for unsupported OSPF RPCs and Notifications 2024-09-13 14:46:34 +02:00
Richard AlpeandJoachim Wiberg 1f74ebf828 test: change query-interval and add retry in igmp_basic
There's a case where the first query is lost due to the network just
starting up. To handle this we introduce a retry loop in the test case
that waits for a second query message to be sent.

In this commit we also lower the query interval to speed up the case
when the first message is lost. Ideally mcd (the underlying multicast
daemon) should implement a Startup Query Interval to send it even
faster.

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-09-10 17:58:26 +02:00
Joachim Wiberg cfd95dc300 confd: use the system base mac as mac address on bridges
To prevent the kernel from setting a random mac address on new bridges,
before we have added any bridge ports, we create bridges using the:

  1. Custom mac address from the configuration (phys-address)
  2. System base mac from /run/system.json
  3. None, if there is no base mac address in system.json, e.g. r2s

Fixes #357

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-10 17:58:26 +02:00
Richard AlpeandJoachim Wiberg 9a2df4b94b confd: initctl touch mcd after querier changes
Prior to this commit, querier multicast changes such as query-interval
where not applied to an existing multicast interface. The new initctl
touch makes finit send a sighup to mcd which causes it to re-load its
configuration files.

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-09-10 16:14:23 +02:00
Mattias WalströmandJoachim Wiberg 5ad2b5da5f build: Add rousette (RESTCONF) to minimal defconfigs 2024-09-10 14:59:50 +02:00
Ahmed KaricandTobias Waldekranz ed6f0b4dce test: update ietf_routing .png 2024-09-10 14:59:12 +02:00
Ahmed KaricandTobias Waldekranz 4efe89b3ea test: update ietf_syslog topologies 2024-09-10 14:59:12 +02:00
Ahmed KaricandMattias Walström b963788fbc test: update infix_dhcp test topologies 2024-09-09 19:15:21 +02:00
Mattias WalströmandJoachim Wiberg f5884098fb Bump rousette to latest GIT hash
Since we are using an old GCC we need to add a new requirement for rousette 'date'
this is included in GCC 14+.
2024-09-09 17:02:51 +02:00
Mattias Walström c456fa1c75 test: spec: Update all test specifications with relative path 2024-09-09 15:11:36 +02:00
Mattias Walström d79d6b7f4d test: spec: Always generate specifications with relative path 2024-09-09 15:11:36 +02:00
Mattias Walström 257c2ac3a1 test: case: Use common topologies for some tests
No need to have seperate topology for theese tests
2024-09-09 15:11:36 +02:00
Ahmed KaricandMattias Walström 47bbc1431a test: update ietf_routing test topologies 2024-09-09 11:50:57 +02:00
Ahmed KaricandMattias Walström 77cd7c6860 test/infamy: cosmetic update in topology (.dot) files 2024-09-09 11:50:57 +02:00
Mattias Walström 1b46444e0b doc: Documentation for test specifcation generate 2024-09-06 10:18:16 +02:00
Mattias Walström b47bbf0221 doc: Update developers guide
Add required tools to build the test specification.
2024-09-06 10:18:16 +02:00
Mattias Walström e4e7dbd714 tests: Add test specification
Add minor changes in all testscripts, to add name and description
Add generated test specification
Add generated topology image
2024-09-06 10:18:16 +02:00
Mattias Walström 4e41663987 test: USB: Refactor general USB test
Better instructions means better test specification
Also add header, used when generate test specification.
2024-09-06 10:18:16 +02:00
Mattias Walström 91d6a7be85 test: USB: Add new test to test systems with two USB ports
Break out this from the general USB test. Test if you can
modify the ports independent of eachother.
2024-09-06 10:18:16 +02:00
Mattias Walström b3831ebe9f Add generation of test specification
The test specifcation is written in Asciidoc and is autogenerated from the content
in the test scripts.

Fonts imported from https://github.com/adobe-fonts/source-code-pro/

To generate the test script:

$ make test-spec
2024-09-06 10:18:16 +02:00
Tobias Waldekranz f77f5852c1 confd: Use system timeout value when loading startup/failure
Now that we have a unified timeout value that all front-ends should
honor, make sure to do so when loading startup-config and
failure-config during boot.

This fixes an issue where the system would fallback to failure-config
even though a legitimate startup-config was available, but took more
than 10s to apply.
2024-09-05 23:41:19 +02:00
Tobias Waldekranz 8d13effbe5 confd: Accept a custom timeout when loading startup/failure
This will enable us to align this timeout with the other front-ends in
the system.
2024-09-05 23:41:19 +02:00
Tobias Waldekranz eb3f8ce711 confd: Break out front-end timeout to common environment file
While sysrepo's architecture places the responsibility of choosing a
timeout on each front-end, we want to control it centrally since the
majority of the time is spend actually applying the config to the
system - which is front-end agnostic.

Therefore, create a single definition of the timeout, which can be
included by all front-ends.
2024-09-05 23:41:19 +02:00
Joachim Wiberg 436b9f20f2 doc: open v24.09 release cycle
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 10:38:06 +02:00
Joachim Wiberg 6752ff4d2f cli: regression in ospf show commands
With the recent changes in Infix v24.08 to tighten up permissions, a
regression in the 'show ospf' family of commands was introduced.

This patch adds a 'doas' prefix to all vtysh commands.  The 'doas' tool
wraps sudo in a way such than unauthorized users do not get a sudo error
thrown as result.

A better fix might be to either include all admin group users also in
the UNIX group 'frrvty', or even better, change the default group of
vtysh to 'wheel'.  Affected files are /etc/frr/vtysh.conf and all
/run/frr/*.vty sockets, the latter are created at runtime by zebra,
ospfd, etc.  This require modifying the buildroot/package/frr/frr.mk
file, which unfortunately have the group hard coded.

    admin@R2:~$ ls -l /etc/frr/vtysh.conf
    -rw-r-----    1 frr      frrvty    32 Sep  3 05:27 /etc/frr/vtysh.conf

    admin@R2:~$ ls -l /run/frr/*.vty
    srwxrwx---    1 frr      frrvty     0 Sep  5 04:37 /run/frr/ospfd.vty
    srwxrwx---    1 frr      frrvty     0 Sep  5 04:37 /run/frr/zebra.vty

Fixes #601

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 10:38:06 +02:00
Joachim Wiberg d856fc8dbc board/common: shellcheck fixes to 'doas' sudo wrapper
Passing $@ to sudo requires quoting to prevent splitting arguments like
this:

    admin@R2:~$ doas vtysh -c 'show ip ospf routes'
    % Command incomplete: show

After this patch:

    admin@R2:~$ doas vtysh -c 'show ip ospf route'
    ============ OSPF network routing table ============
    N    192.168.50.0/24       [1] area: 0.0.0.0
			       directly attached to e7

    ============ OSPF router routing table =============
    R    192.168.100.1         [1] area: 0.0.0.0, ASBR
			       via 192.168.50.1, e7

    ============ OSPF external routing table ===========
    N E2 192.168.10.0/24       [1/20] tag: 0
			       via 192.168.50.1, e7
    N E2 192.168.100.1/32      [1/20] tag: 0
			       via 192.168.50.1, e7

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 10:38:06 +02:00
Joachim Wiberg 56a12d13c4 .github: show size of resulting build tree
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg ba1143cf9b .github: allow defconfig control using manual dispatch
Issue #597

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg 7ddef25013 .github: control defconfig using pull request labels
Issue #597

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg 89f6a8f0fb .github: derive build flavor from branch name
Always build the minimal flavor for branches != main, otherwise use the
default defconfigs so latest build has the correct image.

Issue #597

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg fb96888538 .github: switch default builds to minimal defconfigs
Issue ##597

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg 53df903689 test: skip container tests if target lacks support
Issue #597

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg 804df9373f test: adjust hard-coded transports
RESTCONF, or NETCONF, may not always be available.  Break out and
refactor transport detection/reachability.

NOTE: The shared code paths between wait.py and util.py:wait_boot()
      have been refactored as well to reduce code duplication.

Issue #597

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg f071dacf8b test: add __str__ to Device class for reading device name
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg a69f1c9272 test: autodetect available transports from .config
With the addition of minimal defconfigs without RESTCONF support, detect
transport when 'make test' and 'make test-sh' are called.

We set the new variable INFAMY_TRANSPORT so Infamy can detect protocol
also when in interactive test mode ('make test-sh').

Issue #597

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg 5e03b20bb2 test: minor, cleanup & pep-8 fixes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg 12b62f7803 configs: add minimal defconfigs for tier one platforms
Fixes #597

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg 09e8fad970 configs: pristine copies for minimal build
The name 'minimal' was chosen after a long AFK discussion where names
like 'generic', 'reference', 'testing', 'mod', and others were tossed
around and quickly discarded.

The minimal name can also be extended upon in customer trees, e.g., a
aarch64_minimal_styx_defconfig would indicate something built on the
upstream minimal Aarch64 build of Infix, but with Styx additions.

Issue #597

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg d0f3a5c8b4 board/common: include .config as /usr/share/infix/config.gz
Issue #597

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg b363d0f0f7 doc: update, INFIX_TESTS=.. -> TESTS=..
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Tobias Waldekranz 24fe4e2d4d utils/gh-dl-artifact.sh: Add support script to download artifacts
This will make it easier to locally test images when reviewing PRs,
and will also be a useful tool when running tests on physical test
rigs.

[skip ci]
2024-09-04 15:37:48 +02:00
Ahmed KaricandMattias Walström 46ad19793b test: refactor test environment 2024-09-03 12:13:32 +02:00
Joachim Wiberg e7c9f59582 confd: unchecked return value from remove()
Not much we can do, other than log and report.

Found by Coverity Scan

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-02 11:18:27 +02:00
Joachim Wiberg 480172612a confd: fix possible NULL pointer dereference
The srx_get_str() function may return NULL, which goes unchecked in
both fxlate() and sxlate(), as well as the calls to free().

Found by Coverity Scan

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-02 11:18:27 +02:00
Joachim Wiberg b1d69b69a7 confd: minor, reduce complexity
- Silence linter, add braces
 - Unindent code block to reduce complexity

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-02 11:18:27 +02:00
Joachim Wiberg 3c3c3c95f2 confd: reduce scope of local variables
Found by clang-tidy

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-02 11:18:27 +02:00
Joachim Wiberg ca310589ad confd: fix variable overloading, global xpath unused
Found by clang-tidy

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-02 11:18:27 +02:00
Joachim Wiberg 5baec171c2 confd: constify, found by clang-tidy
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-02 11:18:27 +02:00
Mattias Walström dc4c38ede6 test: Adapt tests/infamy for the new test config
Instead of copy factoy config to reset between tests,
use the new test-config.cfg.

Change the logic in the factory config since the default values have changed.
2024-08-30 17:40:02 +02:00
Mattias Walström 3c045460ef Add implementation to control test mode functions using an action
This intoduce a new sysrepo plugin to handle a new YANG
model 'infix-test'. Today only contains the actions.

This is required to run tests on infix using infamy.

This is a part of #561

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2024-08-30 17:40:02 +02:00
600 changed files with 20775 additions and 10355 deletions
+35
View File
@@ -0,0 +1,35 @@
Checklists for Pull Requests and Releases
=========================================
Maintainer checklists for reviewing pull requests and doing releases.
Pull Requests
-------------
- If applicable, is there a readable ChangeLog entry?
- If any LICENSE file has been updated, has the `.hash` file been updated?
- If any change to a Finit `.svc` file, does any run/task linger?
I.e., is there a runlevel and/or condition defined to prevent them
from running outside of their intended runlevel?
- If any change to grub or qemu/qeneth setup, has it been tested in GNS3?
- If any change to u-boot/buildroot, has it been tested with `<booloader>_defconfig`
- If any change to logging, have the resulting logs been audited?
- Check for duplicate entries, misspellings
- Check for sneaky severity changes, e.g., error vs note, error vs warning
- If new subsystem, or major changes to a subsystem, have the docs been updated?
- If change to mDNS, has it been tested with netbrowse?
- If change to `_defconfig`, verify `local.mk` and sync with other archs
- Test manually as well, e.g., CLI changes do not have ha regression tests
- Build from distclean, or use artifacts built by build servers, for manual tests
Releases
--------
- Make at least one -betaN release to verify the GitHub workflow well in time release day
- Stuff happens, remember kernelkit/infix#735
- Make at least one -rcN to flush out any issues in customer repos
- Easy to forget adaptations/hacks in customer repos -- may need Infix change/support
- Ensure the markdown link for the release diff is updated
- Ensure subrepos are tagged (can be automated, see kernelkit/infix#393)
+126 -29
View File
@@ -1,25 +1,49 @@
Contributing to Infix
=====================
Contributing Guidelines
=======================
We welcome any and all help in the form of bug reports, fixes, patches
to add new features -- *preferably as GitHub pull requests*.
Thank :heart: you for taking the time to read this!
If you are unsure of what to do, or how to implement an idea or bug fix,
open an issue with `"[RFC]: Unsure if this is a bug ... ?"`, or use the
[GitHub discussions forum](https://github.com/orgs/kernelkit/discussions).
Talking about code and problems first is often the best way to get started
before submitting a pull request.
We welcome any help in the form of bug reports, fixes, or patches to add
new features. We *prefer* GitHub pull requests, but are open to other
forms of collaboration as well. [Let's talk!][support] :handshake:
When submitting a bug report, patch, or pull request, please start by
stating the version the change is made against, what it does, *and why*.
If you are unsure how to start implementing an idea or fix:
- :bug: open an issue, there are human friendly templates for _bugs_
and _feature requests_ at <https://github.com/kernelkit/infix/issues>
- :speech_balloon: use the [Q&A Forum][discuss]
- :technologist: The [Developer's Guide][devguide] is also a useful start
> _Talking about code and problems first is often the best way to get
> started before submitting a pull request. We have found it always
> saves time, yours and ours._
:sparkles: General Guidelines
-----------------------------
When submitting bug reports or patches to bugs, please state which
version the change is made against, what it does, and, more importantly
*why* -- from your perspective, why is it a bug, why does the code need
changing in this way. Start with why.
- :bug: Bug reports need metadata like Infix version or commit hash
- :adhesive_bandage: Bug fixes also need version, and (preferably) a
corresponding issue number for the ChangeLog
- :new: New features, you need to get approval of the YANG model first!
:speech_balloon: Please use the [Forum][discuss], e.g., category:
*Ideas*, or open a :pray: feature request issue
- :white_check_mark: New features also need new regression tests, this
can be basic tests or more complex use-case tests comprising multiple
subsystems, see [Testing Changes](#test_tube-testing-changes), below
Please take care to ensure you follow the project coding style and the
commit message format. If you follow these recommendations you help
the maintainer(s) and make it easier for them to include your code.
the maintainers and make it easier for them to include your code.
Coding Style
------------
:woman_technologist: Coding Style
---------------------------------
Before jumping into code, remember to **document new features** and bug
fixes. Both the manual and ChangeLog are in the `doc/` sub-directory
@@ -40,23 +64,58 @@ We expect code contributions for:
> code! Legacy takes precedence, and remember, we read code a lot more
> than write it, so legibility is important.
As a final note, lines are allowed to be longer than 72 characters these
days. There is no enforced maximum, but the team usually keep it around
100 characters for both C and Python.
The ChangeLog deserves a separate mention:
- Releases are listed in reverse chronological order order, so the
latest/next release is at the beginning of the file
- Only *user-facing bugs and features* are detailed, so code refactor,
new tests, etc. are not listed.
- Add your changes/features to the Changes section
- Add your Fix line in the Fixes section, in numeric order
- Changes and fixes without an issue number are listed after all
numbered ones
- YANG model changes are documented in their respective model, for
standard models, e.g., for `ietf-interfaces.yang`, the corresponding
`infix-interfaces.yang` detail augments/deviations as revisions.
A final note, lines of code are allowed to be longer than 72 characters
these days, unless you live by PEP-8 (see above). There is no enforced
maximum, but the team usually keep it around 100 characters for both C
and Python.
Commit Messages
---------------
:test_tube: Testing Changes
---------------------------
Please test your changes, no matter how trivial or obviously correct
they may seem. Nobody is infallible, making mistakes is only human.
It is also the best insurance policy for your feature, it ensures your
use-case will remain functional as the source base evolves.
For new functionality we expect new regression tests to be added in
the same pull request.
For help getting started with testing, see the following resources:
- [Developer's Guide][devguide]
- [Regression Testing][testing]
:memo: Commit Messages
----------------------
Commit messages exist to track *why* a change was made. Try to be as
clear and concise as possible in your commit messages, and always, be
proud of your work and set up a proper GIT identity for your commits:
<img src="../doc/jack.png" width=70 align="right">
$ git config --global user.name "Jacky Linker"
$ git config --global user.email jacky.linker@example.com
Example commit message from the [Pro Git][gitbook] online book, notice
how `git commit -s` is used to automatically add a `Signed-off-by`:
Example commit message from one of many [online guides][cbeams]. Use
`git commit -s` to automatically add a `Signed-off-by` for proof of
origin, see [DCO][] for more info.
subsystem: brief, but clear and concise summary of changes
@@ -73,20 +132,58 @@ how `git commit -s` is used to automatically add a `Signed-off-by`:
- Typically a hyphen or asterisk is used for the bullet, preceded
by a single space, with blank lines in between, but conventions
vary here
If you use an issue tracker, put references to them at the bottom,
like this:
Resolves: #123
See also: #456, #789
Signed-off-by: Jacky Linker <jacky.linker@example.com>
This is an example of how to [automatically close][closing] an issue
when the commit is merged to mainline. Several keywords are available.
Code of Conduct
---------------
:twisted_rightwards_arrows: Pull Requests
-----------------------------------------
> _The git repository is the canonical location for information._
A pull request should preferably address a single issue or change. This
may of course include multiple related changes, but what is important to
remember is the bandwidth of the maintainers. A smaller well documented
PR is more likely to get attention quicker in some reviewer's busy day.
Well documented here means that each commit message stands on its own,
telling the complete story of the change. In fact each commit should,
as much as possible, be independent of other changes. This is very
important, not only when digging though logs to understand why a piece
of code exists, but also when bisecting a problem -- each single commit
should also compile and be possible to run.
If you've worked on projects that send patches, like the Linux kernel or
Buildroot, consider the pull request message body similar to the cover
letter for a series of patches -- it's a summary of changes, and it is
lost when the changes are merged to the mainline branch.
:balance_scale: Code of Conduct
-------------------------------
It is expected of everyone to respect the [Code of Conduct][conduct].
The *"maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, discussion forum threads, issues, and
other contributions that are not aligned to this Code of Conduct."*
[Linux]: https://www.kernel.org/doc/html/v6.9/process/coding-style.html
[PEP-8]: https://peps.python.org/pep-0008/
[RDD]: https://tom.preston-werner.com/2010/08/23/readme-driven-development
[gitbook]: https://git-scm.com/book/ch5-2.html
[conduct]: CODE-OF-CONDUCT.md
[support]: https://github.com/kernelkit/infix/blob/main/.github/SUPPORT.md
[discuss]: https://github.com/orgs/kernelkit/discussions
[testing]: https://github.com/kernelkit/infix/blob/main/doc/testing.md
[devguide]: https://github.com/kernelkit/infix/blob/main/doc/developers-guide.md
[Linux]: https://www.kernel.org/doc/html/v6.9/process/coding-style.html
[PEP-8]: https://peps.python.org/pep-0008/
[RDD]: https://tom.preston-werner.com/2010/08/23/readme-driven-development
[cbeams]: https://cbea.ms/git-commit/#seven-rules
[conduct]: CODE-OF-CONDUCT.md
[DCO]: https://developercertificate.org/
[closing]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests
+12 -1
View File
@@ -1 +1,12 @@
Paid support and development provided by Addiva Elektronik <https://addiva.se>
Limited free support is only available using the online resources of the
project on GitHub, and Discord, see <https://github.com/kernelkit>:
&nbsp;&nbsp; :speech_balloon: <https://github.com/orgs/kernelkit/discussions>
&nbsp;&nbsp; :bug: <https://github.com/kernelkit/infix/issues>
Support contracts, development of new features, fast-tracking of reviews
and contributions, customer branding of Infix, and even customer specific
features for dedicated products is provided by Addiva Elektronik.
&nbsp;&nbsp; :globe_with_meridians: <https://www.addiva.se/electronics/>
&nbsp;&nbsp; :e-mail: <mailto:ael@addiva.se>
+4 -7
View File
@@ -5,12 +5,6 @@
-- Remember: assign a reviewer, or use @mentions if org. member.
-->
## Other information
<!-- Other relevant info, e.g., before/after screenshots -->
## Checklist
Tick *relevant* boxes, this PR is-a or has-a:
@@ -23,9 +17,12 @@ Tick *relevant* boxes, this PR is-a or has-a:
- [ ] Regression tests added?
- [ ] ChangeLog updates (for next release)
- [ ] Documentation added?
- [ ] Test changes
- [ ] Checked in changed Readme.adoc (make test-spec)
- [ ] Added new test to group Readme.adoc and yaml file
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (please detail in commit messages)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] ChangeLog updated (for major changes)
- [ ] Other (please describe):
@@ -0,0 +1,16 @@
name: Adds all issues to project Infix & C:o
on:
issues:
types:
- opened
jobs:
add-to-project:
name: Add issue to project Infix&co
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v1.0.2
with:
project-url: https://github.com/orgs/kernelkit/projects/3
github-token: ${{ secrets.ADD_TO_PROJECT }}
+59 -11
View File
@@ -2,10 +2,17 @@ name: Bob the Builder
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
push:
branches:
- main
workflow_dispatch:
inputs:
minimal:
description: 'Build minimal defconfigs'
required: false
default: true
type: boolean
jobs:
build:
@@ -31,10 +38,26 @@ jobs:
- name: Set Build Variables
id: vars
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
if [ "${{ github.event.inputs.minimal }}" == "true" ]; then
flavor="_minimal"
fi
else
# Ensure 'release' job get the proper image when building main
if [ "$GITHUB_REF_NAME" != "main" ]; then
flavor="_minimal"
else
flavor=""
fi
if ${{ contains(github.event.pull_request.labels.*.name, 'ci:main') }}; then
flavor=""
fi
fi
target=${{ matrix.target }}
echo "dir=infix-$target" >> $GITHUB_OUTPUT
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
echo "flv=$flavor" >> $GITHUB_OUTPUT
echo "Building target ${target}${flavor}_defconfig"
- name: Restore Cache of dl/
uses: actions/cache@v4
with:
@@ -52,23 +75,38 @@ jobs:
ccache-${{ matrix.target }}-
ccache-
- name: Configure ${{ matrix.target }}
- name: Configure ${{ matrix.target }}${{ steps.vars.outputs.flv }}
run: |
make ${{ matrix.target }}_defconfig
make ${{ matrix.target }}${{ steps.vars.outputs.flv }}_defconfig
- name: Unit Test ${{ matrix.target }}
run: |
make test-unit
- name: Build ${{ matrix.target }}
- name: Build ${{ matrix.target }}${{ steps.vars.outputs.flv }}
run: |
echo "Building ${{ matrix.target }}_defconfig ..."
echo "Building ${{ matrix.target }}${{ steps.vars.outputs.flv }}_defconfig ..."
make
- name: Check SBOM from Build
run: |
make legal-info
- name: Build test specification
run: |
make test-spec
- name: Resulting size of build
run: |
printf "Size of complete tree : "
du -sh .
printf "Size of output/ : "
du -sh output
printf "Size of dl/ : "
du -sh dl
printf "Size of output/images/: "
ls -l output/images/
- name: Prepare ${{ matrix.target }} Artifact
run: |
cd output/
@@ -91,16 +129,26 @@ jobs:
clean: true
submodules: recursive
- name: Configure x86_64
- name: Set Build Variables
id: vars
run: |
make x86_64_defconfig
if [ "$GITHUB_REF_NAME" != "main" ]; then
flavor="_minimal"
else
flavor=""
fi
echo "flv=$flavor" >> $GITHUB_OUTPUT
- name: Configure x86_64${{ steps.vars.outputs.flv }}
run: |
make x86_64${{ steps.vars.outputs.flv }}_defconfig
- uses: actions/download-artifact@v4
with:
pattern: "artifact-*"
merge-multiple: true
- name: Restore x86-64 output/
- name: Restore x86-64${{ steps.vars.outputs.flv }} output/
run: |
ls -l
mkdir -p output
@@ -109,11 +157,11 @@ jobs:
tar xf infix-x86_64.tar.gz
ln -s infix-x86_64 images
- name: Regression Test
- name: Regression Test x86_64${{ steps.vars.outputs.flv }}
run: |
make test
- name: Publish Test Result
- name: Publish Test Result for x86_64${{ steps.vars.outputs.flv }}
# Ensure this runs even if Regression Test fails
if: always()
run: cat test/.log/last/result-gh.md >> $GITHUB_STEP_SUMMARY
@@ -152,7 +200,7 @@ jobs:
run: |
cat <<EOF >> $GITHUB_STEP_SUMMARY
# Latest Build Complete! :rocket:
For the public download links of these build artifacts, please see:
<https://github.com/kernelkit/infix/releases/tag/latest>
EOF
+8 -3
View File
@@ -76,6 +76,10 @@ jobs:
run: |
make legal-info
- name: Build test specification
run: |
make test-spec
- name: Prepare Artifacts
run: |
cd output/
@@ -83,8 +87,8 @@ jobs:
ln -s ${{ steps.vars.outputs.dir }} images
tar chfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
mv legal-info legal-info-$target
tar chfz legal-info-$target.tar.gz legal-info-$target
mv legal-info legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}
tar chfz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}.tar.gz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}
- uses: actions/upload-artifact@v4
with:
@@ -146,6 +150,7 @@ jobs:
name: Infix ${{ github.ref_name }}
prerelease: ${{ steps.rel.outputs.pre }}
makeLatest: ${{ steps.rel.outputs.latest }}
discussionCategory: Releases
bodyFile: release.md
artifacts: "*.tar.gz*"
@@ -153,7 +158,7 @@ jobs:
run: |
cat <<EOF >> $GITHUB_STEP_SUMMARY
# Infix ${{ github.ref_name }} Released! :rocket:
For the public download links of this release, please see:
<https://github.com/kernelkit/infix/releases/tag/${{ github.ref_name }}>
EOF
-28
View File
@@ -1,28 +0,0 @@
# To enable automatic sync of your Infix fork every day, or on dispatch,
# set the repoistory or organisation variable (not secret):
#
# SYNC_FORK = true
#
# You also need a GH_SYNC_REPO token allowed to update workflows. For
# more information on variables and secrets, see the GitHub docs.
# See https://docs.github.com/en/actions/learn-github-actions/variables
name: Synchronize your fork of Infix with upstream
on:
schedule:
- cron: 42 2 * * *
workflow_dispatch:
jobs:
sync_fork:
if: ${{github.repository_owner != 'kernelkit' && vars.SYNC_FORK == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: TobKed/github-forks-sync-action@master
with:
github_token: ${{ secrets.GH_SYNC_REPO }}
upstream_repository: KernelKit/infix
upstream_branch: main
target_branch: main
force: false
tags: true
+11
View File
@@ -52,6 +52,17 @@ config INFIX_IMAGE_ID
Mandatory. When INFIX_RELEASE is set, this string is appended to
the IMAGE_ID with a '-' separator.
config INFIX_COMPATIBLE
string "Operating system compatible string"
default "${INFIX_IMAGE_ID}"
help
A lower-case string (no spaces or other characters outside of 09,
az, ".", "_" and "-"), used for image identification at upgrade.
E.g., the RAUC [system] compatible string.
Mandatory. Defaults to $INFIX_IMAGE_ID, which in turn is composed
of $INFIX_ID-$BR2_ARCH.
config INFIX_TAGLINE
string "Operating system tagline"
default "Infix -- a Network Operating System"
+61
View File
@@ -0,0 +1,61 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (C) 2021 Marvell International Ltd.
* Copyright (C) 2024 Addiva Elektronik AB
*
* Device tree for revision A of DCP-SC-28P
*/
#include "dcp-sc-28p.dtsi"
/ {
compatible = "styx,dcp-sc-28p-a",
"styx,dcp-sc-28p",
"marvell,armada-ap807-quad",
"marvell,armada-ap807";
};
&sw3 {
ports {
#address-cells = <1>;
#size-cells = <0>;
/* Can't use XSWP macro as port 0 does not have
* any LEDs attached to it. LEDs for port 10 seem
* to be wired to the corresponding SFP cage. Maybe
* we can apply a static workaround by binding port
* 10's green LED to "Special LED 1", so we can at
* least see link/act.
*/
port@0 {
reg = <0>;
label = "e16";
nvmem-cells = <&base_mac 16>;
nvmem-cell-names = "mac-address";
phy-mode = "10gbase-r";
managed = "in-band-status";
sfp = <&sfp3>;
};
XSWCPU(9, &cp0_eth0);
sw3p10: XSWLINK(a, &sw2p10 &sw1p0);
};
};
&sw2 {
ports {
#address-cells = <1>;
#size-cells = <0>;
sw2p0: XSWLINK(0, &sw1p0);
XSWP(9, "e15", 15, &sfp2);
sw2p10: XSWLINK(a, &sw3p10);
};
};
&sw1 {
ports {
sw1p0: XSWLINK(0, &sw2p0 &sw3p10);
XSWP(9, "e14", 14, &sfp1);
XSWP(a, "e13", 13, &sfp0);
};
};
+39
View File
@@ -0,0 +1,39 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (C) 2021 Marvell International Ltd.
* Copyright (C) 2024 Addiva Elektronik AB
*
* Device tree for revision B of DCP-SC-28P
*/
#include "dcp-sc-28p.dtsi"
/ {
compatible = "styx,dcp-sc-28p-b",
"styx,dcp-sc-28p",
"marvell,armada-ap807-quad",
"marvell,armada-ap807";
};
&sw3 {
ports {
XSWCPU(0, &cp0_eth0);
sw3p9: XSWLINK(9, &sw2p0 &sw1p0);
XSWP(a, "e16", 16, &sfp3);
};
};
&sw2 {
ports {
sw2p0: XSWLINK(0, &sw3p9);
XSWP(9, "e15", 15, &sfp2);
sw2p10: XSWLINK(a, &sw1p0);
};
};
&sw1 {
ports {
sw1p0: XSWLINK(0, &sw2p10 &sw3p9);
XSWP(9, "e14", 14, &sfp1);
XSWP(a, "e13", 13, &sfp0);
};
};
@@ -1,5 +1,5 @@
#ifndef _STYX_MPP_H
#define _STYX_MPP_H
#ifndef _DCP_SC_28P_MPP_H
#define _DCP_SC_28P_MPP_H
#define SFP0_TX_DISABLE(X) X( "mpp0", cp0_gpio1, 0, GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)
#define SFP1_TX_DISABLE(X) X( "mpp1", cp0_gpio1, 1, GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)
@@ -73,4 +73,4 @@
#define MPP_GPIO_REF_NO_CHIP(_mpp, _chip, _no, _flags) <_no (_flags)>
#define MPP_IRQ_REF(_mpp, _chip, _no, _flags) <&_chip _no (_flags)>
#endif /* _STYX_MPP_H */
#endif /* _DCP_SC_28P_MPP_H */
@@ -3,7 +3,7 @@
* Copyright (C) 2021 Marvell International Ltd.
* Copyright (C) 2023 Addiva Elektronik AB
*
* Device tree for Styx board
* Device tree base for DCP-SC-28P
*/
#include <dt-bindings/input/input.h>
@@ -12,13 +12,10 @@
#include "../marvell/cn9130-patched.dtsi"
#include "styx-mpp.h"
#include "dcp-sc-28p-mpp.h"
/ {
model = "Styx";
compatible = "styx,styx",
"marvell,armada-ap807-quad",
"marvell,armada-ap807";
model = "DCP-SC-28P";
chosen {
stdout-path = "serial0:115200n8";
@@ -36,6 +33,14 @@
};
};
/*
* RTC has no valid bit, and this board does not connect any
* backup power (e.g. supercap) to it, so it returns garbage
* after every cold reset.
*/
&cp0_rtc {
status = "disabled";
};
/* UART0 (Console) */
@@ -271,12 +276,6 @@
color = <LED_COLOR_ID_GREEN>; \
default-state = "keep"; \
}; \
led@1 { \
reg = <1>; \
function = _func; \
color = <LED_COLOR_ID_YELLOW>; \
default-state = "off"; \
}; \
}
#define XSWP(_n, _label, _mac_offs, _sfp) \
@@ -287,10 +286,33 @@
nvmem-cell-names = "mac-address"; \
phy-mode = "10gbase-r"; \
managed = "in-band-status"; \
sfp = <&_sfp>; \
sfp = <_sfp>; \
SWP_LED("sfp"); \
}
#define XSWCPU(_n, _eth) \
port@_n { \
reg = <0x ## _n>; \
label = "cpu"; \
ethernet = <_eth>; \
phy-mode = "10gbase-r"; \
fixed-link { \
speed = <10000>; \
full-duplex; \
}; \
}
#define XSWLINK(_n, _link) \
port@_n { \
reg = <0x ## _n>; \
link = <_link>; \
phy-mode = "10gbase-r"; \
fixed-link { \
speed = <10000>; \
full-duplex; \
}; \
}
#define GSWP(_n, _label, _mac_offs, _phy) \
port@_n { \
reg = <0x ## _n>; \
@@ -298,7 +320,7 @@
nvmem-cells = <&base_mac _mac_offs>; \
nvmem-cell-names = "mac-address"; \
phy-mode = "gmii"; \
phy-handle = <&_phy>; \
phy-handle = <_phy>; \
SWP_LED("tp"); \
}
@@ -332,52 +354,14 @@
#address-cells = <1>;
#size-cells = <0>;
port@9 {
reg = <0x9>;
label = "cpu";
ethernet = <&cp0_eth0>;
phy-mode = "10gbase-r";
fixed-link {
speed = <10000>;
full-duplex;
};
};
sw3p10: port@a {
reg = <0xa>;
link = <&sw2p10 &sw1p0>;
phy-mode = "10gbase-r";
fixed-link {
speed = <10000>;
full-duplex;
};
};
/* Can't use XSWP macro as port 0 does not have
* any LEDs attached to it. LEDs for port 10 seem
* to be wired to the corresponding SFP cage. Maybe
* we can apply a static workaround by binding port
* 10's green LED to "Special LED 1", so we can at
* least see link/act.
*/
port@0 {
reg = <0>;
label = "e16";
nvmem-cells = <&base_mac 16>;
nvmem-cell-names = "mac-address";
phy-mode = "10gbase-r";
managed = "in-band-status";
sfp = <&sfp3>;
};
GSWP(1, "e22", 22, sw3phy1);
GSWP(2, "e21", 21, sw3phy2);
GSWP(3, "e24", 24, sw3phy3);
GSWP(4, "e23", 23, sw3phy4);
GSWP(5, "e26", 26, sw3phy5);
GSWP(6, "e25", 25, sw3phy6);
GSWP(7, "e28", 28, sw3phy7);
GSWP(8, "e27", 27, sw3phy8);
GSWP(1, "e22", 22, &sw3phy1);
GSWP(2, "e21", 21, &sw3phy2);
GSWP(3, "e24", 24, &sw3phy3);
GSWP(4, "e23", 23, &sw3phy4);
GSWP(5, "e26", 26, &sw3phy5);
GSWP(6, "e25", 25, &sw3phy6);
GSWP(7, "e28", 28, &sw3phy7);
GSWP(8, "e27", 27, &sw3phy8);
};
mdio {
@@ -412,36 +396,14 @@
#address-cells = <1>;
#size-cells = <0>;
sw2p0: port@0 {
reg = <0x0>;
link = <&sw1p0>;
phy-mode = "10gbase-r";
fixed-link {
speed = <10000>;
full-duplex;
};
};
sw2p10: port@a {
reg = <0xa>;
link = <&sw3p10>;
phy-mode = "10gbase-r";
fixed-link {
speed = <10000>;
full-duplex;
};
};
GSWP(1, "e10", 10, sw2phy1);
GSWP(2, "e9", 9, sw2phy2);
GSWP(3, "e12", 12, sw2phy3);
GSWP(4, "e11", 11, sw2phy4);
GSWP(5, "e18", 18, sw2phy5);
GSWP(6, "e17", 17, sw2phy6);
GSWP(7, "e20", 20, sw2phy7);
GSWP(8, "e19", 19, sw2phy8);
XSWP(9, "e15", 15, sfp2);
GSWP(1, "e10", 10, &sw2phy1);
GSWP(2, "e9", 9, &sw2phy2);
GSWP(3, "e12", 12, &sw2phy3);
GSWP(4, "e11", 11, &sw2phy4);
GSWP(5, "e18", 18, &sw2phy5);
GSWP(6, "e17", 17, &sw2phy6);
GSWP(7, "e20", 20, &sw2phy7);
GSWP(8, "e19", 19, &sw2phy8);
};
mdio {
@@ -476,26 +438,14 @@
#address-cells = <1>;
#size-cells = <0>;
sw1p0: port@0 {
reg = <0x0>;
link = <&sw2p0 &sw3p10>;
phy-mode = "10gbase-r";
fixed-link {
speed = <10000>;
full-duplex;
};
};
GSWP(1, "e2", 2, sw1phy1);
GSWP(2, "e1", 1, sw1phy2);
GSWP(3, "e4", 4, sw1phy3);
GSWP(4, "e3", 3, sw1phy4);
GSWP(5, "e6", 6, sw1phy5);
GSWP(6, "e5", 5, sw1phy6);
GSWP(7, "e8", 8, sw1phy7);
GSWP(8, "e7", 7, sw1phy8);
XSWP(9, "e14", 14, sfp1);
XSWP(a, "e13", 13, sfp0);
GSWP(1, "e2", 2, &sw1phy1);
GSWP(2, "e1", 1, &sw1phy2);
GSWP(3, "e4", 4, &sw1phy3);
GSWP(4, "e3", 3, &sw1phy4);
GSWP(5, "e6", 6, &sw1phy5);
GSWP(6, "e5", 5, &sw1phy6);
GSWP(7, "e8", 8, &sw1phy7);
GSWP(8, "e7", 7, &sw1phy8);
};
mdio {
-9
View File
@@ -1,9 +0,0 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (C) 2021 Marvell International Ltd.
* Copyright (C) 2023 Addiva Elektronik AB
*
* Device tree for Styx board
*/
#include "styx.dtsi"
+2
View File
@@ -539,6 +539,8 @@ CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_TIMEOUT=20
CONFIG_DETECT_HUNG_TASK=y
# CONFIG_SCHED_DEBUG is not set
# CONFIG_RCU_TRACE is not set
+1 -1
View File
@@ -128,7 +128,7 @@ what provides a default, the same default MAC addresses to Linux:
This is important in case you want to run multiple R2S devices on the
same LAN. Meaning you either have to change the MAC address in the
U-Boot environment (below), or modify your `phys-address` setting in
U-Boot environment (below), or use the `custom-phys-address` setting in
Infix for the interface(s).
Break into U-Boot using Ctrl-C at power-on, preferably when the text
@@ -58,6 +58,7 @@
}
},
"ietf-netconf-acm:nacm": {
"enable-nacm": true,
"groups": {
"group": [
{
@@ -83,6 +84,21 @@
"comment": "Allow 'admin' group complete access to all operations and data."
}
]
},
{
"name": "default-deny-all",
"group": [
"*"
],
"rule": [
{
"name": "deny-password-read",
"module-name": "ietf-system",
"path": "/ietf-system:system/authentication/user/password",
"access-operations": "*",
"action": "deny"
}
]
}
]
},
@@ -123,7 +139,8 @@
"name": "ntp.org",
"udp": {
"address": "pool.ntp.org"
}
},
"iburst": true
}
]
},
@@ -169,7 +186,7 @@
]
},
"infix-meta:meta": {
"infix-meta:version": "1.0"
"infix-meta:version": "1.2"
},
"infix-services:mdns": {
"enabled": true
+1
View File
@@ -0,0 +1 @@
dcp-sc-28p-b.dtb
+1
View File
@@ -0,0 +1 @@
dcp-sc-28p-a.dtb
@@ -0,0 +1,2 @@
# empty to disable port LED control on Styx, for details, see issue
# https://github.com/kernelkit/infix/issues/670#issuecomment-2419025575
-12
View File
@@ -107,18 +107,6 @@ config DISK_IMAGE_BOOT_OFFSET
to make sure that the GPT still fits at the start of the
image.
config DISK_IMAGE_TEST_MODE
bool "Enable Test Mode"
depends on DISK_IMAGE
default y
help
Enable the test mode option by default. This setting creates a test-mode flag
in the auxiliary partition of the disk image, initiating the system with the test-config
instead of regular startup-config. The primary purpose of running an image in this mode
is to ensure proper execution of all Infix tests. Additionally, it enables extra RPCs
related to system restart and configuration overrides, allowing tests to be run even on
systems where the factory configuration may potentially create L2 loops.
config DISK_IMAGE_RELEASE_URL
string "Infix URL"
depends on DISK_IMAGE
+130
View File
@@ -0,0 +1,130 @@
Welcome to Infix!
=================
Nice to meet ❤️ you! If you are reading this then you have possibly
just downloaded and unpacked a release build and are curious about how
to proceed from here.
To test Infix You need a Linux 🐧 system with Qemu or GNS3 installed.
We recommend Debian based systems, like Ubuntu and Linux Mint.
> For a pain-free experience we recommend enabling CPU virtualization in
> your BIOS/UEFI, which for many computers is disabled by default.
From this point we assume you have your x86_64/AMD64 based Linux system
up and running. Time to start your favorite terminal application! 😃
Installing Qemu
---------------
This README focus on getting you started with Qemu. From a terminal,
install (at least) the x86/x86_64 emulator. The 'virt-manager' is a
package that helps pull in other dependencies you may need:
$ sudo apt install qemu-system-x86 virt-manager
That's it.
Running Infix in Qemu
---------------------
Depending on how your Linux installation is set up, the following may
require being run with superuser privileges, i.e., you may need to
repend the command with 'sudo'.
$ ./qemu.sh
You should now see the Infix init system booting up. When the final
"Please press Enter to activate this console." is shown, press Enter
and the login: prompt is displayed.
The default credentials for the demo builds is
login: admin
password: admin
Infix -- a Network Operating System v24.09.0-rc1 (hvc0)
infix-00-00-00 login: admin
Password:
.-------.
| . . | Infix -- a Network Operating System
|-. v .-| https://kernelkit.org
'-'---'-'
Run the command 'cli' for interactive OAM
admin@infix-00-00-00:~$
You're in! Play around in your sandbox as much as you like, if you
run into problems or have questions, please see the documentation,
and don't hesitate to get in touch with us! 😃
- https://github.com/kernelkit/infix/tree/main/doc
Customizing your "Hardware"
---------------------------
For more Ethernet ports in your emulated system you need to change the
Qemu configuration used for Infix. This can be done using a menuconfig
interface, which requires the following extra package:
$ sudo apt install kconfig-frontends
We can now enter the configuration:
$ ./qemu.sh -c
Go down to *Networking*, select *TAP*, now you can change the *Number of
TAPs*, e.g. to 10. Exit and save the configuration, then you can start
Qemu again:
./qemu.sh
> Make sure to do a factory reset from the CLI, otherwise you will be
> stuck with that single interface from before.
Errors on Console
-----------------
If you see the following line printed one or more times, don't panic.
LABEL=var: Can't lookup blockdev
See the Customizing section above. To silence the error you need to
create another writable partition for Infix to store logs, container
images, etc. Look for the 'var' keyword, you can adjust the size of
the partition.
Graphical Network Simulator 3 (GNS3)
------------------------------------
GNS3 is a very powerful front-end to Qemu which takes care of creating
virtual links between network devices running in Qemu. This README is
only link to the material you need. This directory holds the appliance
file, .gns3a, that references image files also in this directory, that
you need to load into GNS3.
The necessary extra packages are available through the offical PPA. If
you don't know what a PPA is, read up on that first:
- https://launchpad.net/~gns3/+archive/ubuntu/ppa
There's a lot of tutorials and guides online, start here:
- https://docs.gns3.com/docs/
About
-----
Infix is a free, Linux based, immutable Network Operating System (NOS)
built on Buildroot, and sysrepo. A powerful mix that ease porting to
different platforms, simplify long-term maintenance, and provide easy
management using NETCONF, RESTCONF, or the built-in command line
interface (CLI) from a console or SSH login.
+6 -6
View File
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.36.0
# Thu Feb 8 08:22:32 2024
# Busybox version: 1.36.1
# Tue Oct 22 13:12:02 2024
#
CONFIG_HAVE_DOT_CONFIG=y
@@ -957,10 +957,10 @@ CONFIG_FEATURE_NETSTAT_PRG=y
CONFIG_NSLOOKUP=y
CONFIG_FEATURE_NSLOOKUP_BIG=y
CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS=y
CONFIG_NTPD=y
CONFIG_FEATURE_NTPD_SERVER=y
CONFIG_FEATURE_NTPD_CONF=y
CONFIG_FEATURE_NTP_AUTH=y
# CONFIG_NTPD is not set
# CONFIG_FEATURE_NTPD_SERVER is not set
# CONFIG_FEATURE_NTPD_CONF is not set
# CONFIG_FEATURE_NTP_AUTH is not set
CONFIG_PING=y
CONFIG_PING6=y
CONFIG_FEATURE_FANCY_PING=y
+11 -2
View File
@@ -16,13 +16,22 @@ die()
# DISK_IMAGE_SIZE="512"
# etc.
#
# Nested variables, like INFIX_COMPATIBLE="${INFIX_IMAGE_ID}"
# are handled by sourcing the file in a subshell.
#
# shellcheck disable=SC1090
load_cfg()
{
tmp=$(mktemp -p /tmp)
(
. "$BR2_CONFIG" 2>/dev/null
# Set *all* matching variables
set | grep -E "^${1}[^=]*=" | while IFS= read -r line; do
echo "$line"
done
) > "$tmp"
grep -E "${1}.*=" "$BR2_CONFIG" >"$tmp"
. "$tmp"
rm "$tmp"
}
+1 -10
View File
@@ -128,7 +128,7 @@ diskimg=disk.img
bootimg=
bootpart=
while getopts "a:b:B:n:s:t" opt; do
while getopts "a:b:B:n:s:" opt; do
case ${opt} in
a)
arch=$OPTARG
@@ -145,9 +145,6 @@ while getopts "a:b:B:n:s:t" opt; do
s)
total=$(size2int $OPTARG)
;;
t)
testmode=true
;;
esac
done
shift $((OPTIND - 1))
@@ -193,12 +190,6 @@ cp -f $BINARIES_DIR/rootfs.itbh $root/aux/primary.itbh
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/secondary.itbh
cp -f $BINARIES_DIR/rauc.status $root/aux/rauc.status
if [ "$testmode" = true ]; then
touch "$root/aux/test-mode"
else
rm -f "$root/aux/test-mode"
fi
case "$arch" in
aarch64)
mkenvimage -s 0x4000 -o "$root/aux/uboot.env" \
+5 -1
View File
@@ -62,7 +62,7 @@ else
fi
if [ -f "$TARGET_DIR/etc/rauc/system.conf" ]; then
sed -i "s/compatible=.*/compatible=$NAME/" "$TARGET_DIR/etc/rauc/system.conf"
sed -i "s/compatible=.*/compatible=$INFIX_COMPATIBLE/" "$TARGET_DIR/etc/rauc/system.conf"
fi
# This is a symlink to /usr/lib/os-release, so we remove this to keep
@@ -104,6 +104,10 @@ rm -f "$TARGET_DIR/etc/os-release"
echo "$INFIX_TAGLINE $VERSION -- $(date +"%b %e %H:%M %Z %Y")" > "$TARGET_DIR/etc/version"
# In case of ambguities, this is what the image was built from
cp "$BR2_CONFIG" "$TARGET_DIR/usr/share/infix/config"
gzip -f "$TARGET_DIR/usr/share/infix/config"
# Drop Buildroot default symlink to /tmp
if [ -L "$TARGET_DIR/var/lib/avahi-autoipd" ]; then
rm "$TARGET_DIR/var/lib/avahi-autoipd"
+9 -8
View File
@@ -7,11 +7,14 @@ common=$(dirname "$(readlink -f "$0")")
# shellcheck disable=SC1091
. "$TARGET_DIR/etc/os-release"
load_cfg INFIX_ID
# The INFIX_* variables may be composed from BR2_* variables,
# so we source them last.
load_cfg BR2_ARCH
load_cfg BR2_DEFCONFIG
load_cfg BR2_EXTERNAL_INFIX_PATH
load_cfg BR2_TARGET_ROOTFS
load_cfg INFIX_ID
load_cfg INFIX_COMPATIBLE
# The default IMAGE_ID is infix-$BR2_ARCH but can be overridden
# for imaage names, and compat strings, like infix-r2s
@@ -39,7 +42,7 @@ if [ "$SIGN_ENABLED" = "y" ]; then
$common/sign.sh $BR2_ARCH $SIGN_KEY
ixmsg "Creating RAUC Update Bundle"
$common/mkrauc.sh "$NAME$(ver)" $NAME $SIGN_KEY
$common/mkrauc.sh "$NAME$(ver)" $INFIX_COMPATIBLE $SIGN_KEY
fi
load_cfg DISK_IMAGE
@@ -59,13 +62,8 @@ if [ "$DISK_IMAGE" = "y" ]; then
tar -xa --strip-components=1 -C "$BINARIES_DIR" -f "$archive"
fi
testmode_flag=""
if [ "$DISK_IMAGE_TEST_MODE" = "y" ]; then
testmode_flag="-t"
fi
$common/mkrauc-status.sh "$BINARIES_DIR/${NAME}.pkg" >"$BINARIES_DIR/rauc.status"
$common/mkdisk.sh -a $BR2_ARCH -n $diskimg $testmode_flag -s $DISK_IMAGE_SIZE $bootcfg
$common/mkdisk.sh -a $BR2_ARCH -n $diskimg -s $DISK_IMAGE_SIZE $bootcfg
fi
load_cfg SDCARD_AUX
@@ -107,3 +105,6 @@ rm -f "$BINARIES_DIR/qemu.cfg"
CONFIG_="CONFIG_" BR2_CONFIG="$BINARIES_DIR/qemu.cfg" \
"$O/build/buildroot-config/conf" --olddefconfig "$BINARIES_DIR/Config.in"
rm -f "$BINARIES_DIR/qemu.cfg.old" "$BINARIES_DIR/.config.old"
# Quick intro for beginners, with links to more information
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/README.txt" "$BINARIES_DIR/"
+49
View File
@@ -106,6 +106,8 @@ config QEMU_DTB_EXTEND
depends on QEMU_LOADER_UBOOT
default y if QEMU_aarch64
if QEMU_ROOTFS_INITRD
config QEMU_RW
string "Writable /cfg layer"
depends on QEMU_ROOTFS_INITRD
@@ -123,6 +125,8 @@ config QEMU_RW_VAR
default "var.ext4"
endif
endif
config QEMU_VPD
bool "Emulate a Vital Product Data (VPD) Memory"
@@ -137,6 +141,51 @@ config QEMU_APPEND
config QEMU_EXTRA
string "Extra QEMU options"
comment "RTC"
choice
prompt "Mode"
default QEMU_RTC_UTC
config QEMU_RTC_UTC
bool "UTC"
config QEMU_RTC_LOCAL
bool "Local time"
config QEMU_RTC_RANDOM
bool "Random"
endchoice
choice
prompt "Clock"
default QEMU_CLOCK_HOST
config QEMU_CLOCK_HOST
bool "Host clock"
config QEMU_CLOCK_RT
bool "Independent (monotonic)"
config QEMU_CLOCK_VM
bool "Virtual"
endchoice
config QEMU_RTC
string
default "utc" if QEMU_RTC_UTC
default "localtime" if QEMU_RTC_LOCAL
default "random" if QEMU_RTC_RANDOM
config QEMU_CLOCK
string
default "host" if QEMU_CLOCK_HOST
default "rt" if QEMU_CLOCK_RT
default "vm" if QEMU_CLOCK_VM
comment "Networking"
choice
+36 -7
View File
@@ -261,7 +261,25 @@ EOF
wdt_args()
{
echo -n "-device i6300esb -rtc clock=host"
echo -n "-device i6300esb "
}
random_date()
{
rand=$(($(date +%_s) * $$ + $(date +%N | sed 's/^0*//')))
when=$((rand % 7258118400)) # 1970 - 2200
date -d "@$when" +"%Y-%m-%dT%H:%M:%S"
}
rtc_args()
{
rtc="${CONFIG_QEMU_RTC:-utc}"
clock="${CONFIG_QEMU_CLOCK:-host}"
if [ "$rtc" = "random" ]; then
rtc=$(random_date)
fi
echo -n "-rtc base=$rtc,clock=$clock"
}
gdb_args()
@@ -273,11 +291,19 @@ gdb_args()
run_qemu()
{
if [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
qemu-img create -f qcow2 -o backing_file=$CONFIG_QEMU_ROOTFS -F raw $CONFIG_QEMU_ROOTFS.qcow2 > /dev/null
if ! qemu-img check "${CONFIG_QEMU_ROOTFS}.qcow2"; then
rm -f "${CONFIG_QEMU_ROOTFS}.qcow2"
fi
if [ ! -f "${CONFIG_QEMU_ROOTFS}.qcow2" ]; then
echo "Creating qcow2 disk image for Qemu ..."
qemu-img create -f qcow2 -o backing_file="$CONFIG_QEMU_ROOTFS" \
-F raw "${CONFIG_QEMU_ROOTFS}.qcow2" > /dev/null
fi
fi
local qemu
read qemu <<EOF
$CONFIG_QEMU_MACHINE -m $CONFIG_QEMU_MACHINE_RAM \
$CONFIG_QEMU_MACHINE -nodefaults -m $CONFIG_QEMU_MACHINE_RAM \
$(loader_args) \
$(rootfs_args) \
$(serial_args) \
@@ -286,16 +312,23 @@ run_qemu()
$(host_args) \
$(net_args) \
$(wdt_args) \
$(rtc_args) \
$(vpd_args) \
$(gdb_args) \
$CONFIG_QEMU_EXTRA
EOF
echo "Starting Qemu :: Ctrl-a x -- exit | Ctrl-a c -- toggle console/monitor"
line=$(stty -g)
stty raw
if [ "$CONFIG_QEMU_KERNEL" ]; then
$qemu -append "$(append_args)" "$@"
else
$qemu "$@"
fi
stty "$line"
}
dtb_args()
@@ -401,8 +434,4 @@ fi
generate_dot
echo "Starting Qemu :: Ctrl-a x -- exit | Ctrl-a c -- toggle console/monitor"
line=$(stty -g)
stty raw
run_qemu $(dtb_args)
stty "$line"
@@ -1,24 +1,4 @@
#!/bin/sh
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with avahi; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
set -e
# Command line arguments:
# $1 event that happened:
# BIND: Successfully claimed address
@@ -29,60 +9,54 @@ set -e
# $3 IP adddress
PATH="$PATH:/usr/bin:/usr/sbin:/bin:/sbin"
NAME="/etc/frr/static.d/$2-zeroconf.conf"
NEXT="${NAME}+"
# Use a different metric for each interface, so that we can set
# identical routes to multiple interfaces.
log()
{
logger -I $$ -t zeroconf -p user.notice "$*"
}
METRIC=$((1000 + `cat "/sys/class/net/$2/ifindex" 2>/dev/null || echo 0`))
if [ -x /bin/ip -o -x /sbin/ip ] ; then
# We have the Linux ip tool from the iproute package
case "$1" in
BIND)
ip addr flush dev "$2" label "$2:avahi"
ip addr add "$3"/16 brd 169.254.255.255 label "$2:avahi" scope link dev "$2" proto 6
ip route add default dev "$2" metric "$METRIC" scope link proto zeroconf ||:
;;
CONFLICT|UNBIND|STOP)
ip route del default dev "$2" metric "$METRIC" scope link ||:
ip addr del "$3"/16 brd 169.254.255.255 label "$2:avahi" scope link dev "$2"
;;
*)
echo "Unknown event $1" >&2
exit 1
;;
# Reduce changes needed by comparing with previous route(s)
act()
{
case $1 in
add)
echo "! Generated by avahi-autoipd" > "$NEXT"
echo "ip route 0.0.0.0/0 $2 254" >> "$NEXT"
cmp -s "$NAME" "$NEXT" && return
mv "$NEXT" "$NAME"
;;
del)
[ -f "$NAME" ] || return
rm "$NAME"
;;
*)
return
;;
esac
elif [ -x /bin/ifconfig -o -x /sbin/ifconfig ] ; then
initctl -nbq restart staticd
}
# We have the old ifconfig tool
case "$1" in
BIND)
ip addr flush dev "$2" proto random
ip addr add "$3"/16 brd 169.254.255.255 scope link dev "$2" proto random
act add "$2"
log "set ipv4ll $3 on iface $2"
;;
case "$1" in
BIND)
ifconfig "$2:avahi" inet "$3" netmask 255.255.0.0 broadcast 169.254.255.255 up
route add default dev "$2:avahi" metric "$METRIC" ||:
;;
CONFLICT|UNBIND|STOP)
act del "$2"
ip addr flush dev "$2" proto random
log "clr ipv4ll on iface $2"
;;
CONFLICT|STOP|UNBIND)
route del default dev "$2:avahi" metric "$METRIC" ||:
ifconfig "$2:avahi" down
;;
*)
echo "Unknown event $1" >&2
exit 1
;;
esac
else
echo "No network configuration tool found." >&2
exit 1
fi
*)
log "Unknown event $1 on iface $2"
exit 1
;;
esac
exit 0
+1
View File
@@ -0,0 +1 @@
CONFD_TIMEOUT=60
@@ -1,3 +1,3 @@
service name:rousette notify:none log <pid/confd> \
[12345] rousette --syslog -t 60 \
service name:rousette notify:none log <pid/confd> env:/etc/default/confd \
[12345] rousette --syslog -t $CONFD_TIMEOUT \
-- RESTCONF server
@@ -0,0 +1,9 @@
! Default settings for staticd, used for both
! confd generated routes, udhcpc and zeroconf
frr defaults traditional
hostname Router
password zebra
enable password zebra
no log unique-id
log syslog informational
log facility local2
+5
View File
@@ -1 +1,6 @@
# Micro GNU Emacs default configuration file
auto-indent-mode
auto-fill-mode
make-backup-files 0
require-final-newline T
set-fill-column 72
+3
View File
@@ -1 +1,4 @@
# Allow client to pass locale environment
AcceptEnv LANG LC_*
Include /etc/ssh/sshd_config.d/*.conf
@@ -1 +0,0 @@
Subsystem cli /usr/bin/klish
@@ -0,0 +1 @@
Subsystem sftp /usr/libexec/sftp-server
+1 -1
View File
@@ -2,4 +2,4 @@
# Silly wrapper around sudo to prevent it from printing an error for
# unprivileged users: sudo: a password is required
id -nG $LOGNAME | grep -qw wheel && sudo -n $@
id -nG "$LOGNAME" | grep -qw wheel && sudo -n "$@"
+366
View File
@@ -0,0 +1,366 @@
#!/bin/sh
# Displays basic information about the system
# shellcheck disable=SC2048,SC2086
. /etc/os-release
bopt="-c"
opt="-br"
all=""
plain=""
h1()
{
STR="$*"
if [ -n "$plain" ]; then
echo "$STR" | tr '[:lower:]' '[:upper:]'
else
printf "\033[7m%-${COLUMNS}s\033[0m\n" "$STR"
fi
}
h2()
{
STR="$*"
if [ -n "$plain" ]; then
echo "$STR"
echo "$STR" | sed 's/./-/g'
else
printf "\033[1m%-${COLUMNS}s\033[0m\n" "$STR"
fi
}
dm()
{
if [ -n "$plain" ]; then
echo "${*}"
else
printf "\033[2m%s\033[0m\n" "$*"
fi
}
ul()
{
if [ -n "$plain" ]; then
printf "__%s__" "$*"
else
printf "\033[4%s\033[0m" "$*"
fi
}
em()
{
if [ -n "$plain" ]; then
printf "**%s**" "$*"
else
printf "\033[5m%s\033[0m" "$*"
fi
}
usage()
{
cat <<EOF
usage:
show [opt] cmd
options:
-a Show all, of something
-f Show full output, not brief port/iface listings
-h Show this help text
-n Show output without any footer
-p Show plain output, no bells or whistles
commands:
port PORT Show port configuration and link information
ports Show ports available for bridging
vlans Show port groups in bridge
ifaces Show interfaces and their addresses
fdb Show forwarding database (unicast)
mdb Show multicast forwarding database
ip addr Show IPv4 addresses
route Show routing table
ipv6 addr Show IPv6 addresses
route Show routing table
log [FILE] Show latest entries from syslog, or other FILE
rmon PORT Show RMON counters for PORT (when applicable)
system Show OS details
version Show OS verson
EOF
}
# Usage 1: show port eth0
# Usage 2: show port
# Usage 3: show ports
#
# The first show ethtool output for 'eth0' (in this case). The latter
# two are the same, showing a summary of all interfaces classified as
# access ports.
ports()
{
if [ $# -gt 0 ] && [ -e "/sys/class/net/$1" ]; then
for port in $*; do
ethtool "$port"
done
return
fi
h1 "PORT STATE MAC ADDRESS FLAGS"
if grep -q port /etc/iproute2/group; then
ip $opt link show group port
else
ip $opt link show
fi
if [ -z "$plain" ] && [ -z "$nofoot" ]; then
dm "______________________________________________________________________________"
dm "Use: '[ip|bridge] --help' and '[ip|bridge] link help' for more details."
fi
}
vlans()
{
h1 "INTERFACE VLAN FLAGS"
bridge $bopt vlan show |tail +2 | awk 'NF { iface=$1; vid=$2; printf("%-16s %4d ", iface, vid); for (i=3; i <= NF; i++) printf("%s ", $i); printf("\n"); }'
if [ -z "$plain" ] && [ -z "$nofoot" ]; then
dm "______________________________________________________________________________"
dm "See: 'bridge --help' and 'bridge vlan help' for more details."
fi
}
ifaces()
{
if [ -n "$all" ]; then
if [ $# -gt 0 ]; then
for iface in $*; do
ip $opt addr show dev "$iface"
done
return
fi
h1 "INTERFACE STATE ADDRESS"
ip $opt addr show
if [ -z "$plain" ] && [ -z "$nofoot" ]; then
dm "______________________________________________________________________________"
dm "See: 'ip --help' and 'ip address help' for more details."
fi
else
if [ $# -gt 0 ]; then
for iface in $*; do
sysrepocfg -f json -X -d operational -x \
"/ietf-interfaces:interfaces/interface[name='$iface']" | \
/usr/libexec/statd/cli-pretty "show-interfaces" -n "$iface"
done
return
fi
sysrepocfg -f json -X -d operational -m ietf-interfaces | \
/usr/libexec/statd/cli-pretty "show-interfaces"
fi
}
log()
{
if [ -n "$1" ] && [ -r "/var/log/$1" ]; then
fn="/var/log/$1"
else
fn="/var/log/syslog"
fi
less +G $fn
}
rmon()
{
if [ -z "$*" ]; then
echo "Missing argument, see 'show port' for available interfaces"
exit 1
fi
for port in $*; do
ethtool -S "$port"
done
if [ -z "$plain" ] && [ -z "$nofoot" ]; then
dm "______________________________________________________________________________"
dm "See: 'ethtool --help' for more details."
fi
}
rstp()
{
mstpctl showbridge
echo "br0 port info"
mstpctl showport br0
}
fdb()
{
bridge $bopt fdb show
}
mdb()
{
bridge $bopt mdb show
}
routes()
{
if [ -n "$1" ]; then
arg="-i $1"
else
arg="-i ipv4"
fi
sysrepocfg -f json -X -d operational -x "/ietf-routing:routing/ribs" | \
/usr/libexec/statd/cli-pretty "show-routing-table" $arg
}
igmp()
{
mctl $@
}
system()
{
h1 "SYSTEM INFORMATION"
echo "System Name : $(uname -n)"
echo "System Variant : $VARIANT"
echo "System Description : $PRETTY_NAME"
echo "System Contact : $HOME_URL"
echo "System Timezone : $(cat /etc/timezone)"
echo "System Type : $NAME"
echo "System Version : $(cat /etc/version)"
echo "System Arch : $(uname -m)"
echo "Kernel Version : $(uname -sr)"
}
version()
{
cat /etc/version
}
while [ "$1" != "" ]; do
case $1 in
-a)
all=1
;;
-f)
opt=""
if [ -n "$plain" ]; then
opt="-color=never"
bopt="-color=never"
fi
opt="-d $opt"
bopt="-d $bopt"
;;
-n)
nofoot="yes"
;;
-p)
plain="yes"
opt="$opt -color=never"
bopt="$bopt -color=never"
;;
-h)
usage
exit 0
;;
*)
break
esac
shift
done
if [ -z "$plain" ]; then
TTY=$(resize)
eval "$TTY"
# COLUMS and ROWS should be set on the console, if not, use fallback
if [ -z "$COLUMNS" ]; then
if command -v tput; then
COLUMNS=$(tput cols)
else
COLUMNS=80
fi
fi
fi
cmd=$1
if [ -n "$cmd" ]; then
shift
fi
case $cmd in
help)
usage
;;
port*)
ports $*
;;
vlan*)
vlans
;;
fdb)
fdb
;;
mdb)
mdb
;;
ifa*)
ifaces $*
;;
ip)
cmd=$1
shift
case $cmd in
addr*)
all=1
opt="$opt -d"
ifaces $*
;;
route*)
routes ipv4
;;
igmp*)
igmp $*
;;
*)
usage
;;
esac
;;
ipv6)
cmd=$1
shift
case $cmd in
addr*)
ifaces
;;
route*)
routes ipv6
;;
mld*)
igmp $*
;;
*)
usage
;;
esac
;;
log)
log $1
;;
rmon)
rmon $*
;;
route*)
routes
;;
span*)
rstp
;;
sys*)
system
;;
ver*)
version
;;
*)
usage
exit 1
;;
esac
@@ -14,6 +14,24 @@ for file in /sys/firmware/qemu_fw_cfg/by_name/opt/mactab/raw /etc/mactab; do
fi
done
# Sometimes the sysfs is not populated when the switch driver is loaded, with the result
# that the DSA interface was not found (no /dsa/tagging entry in sysfs. See issue #685.
#
# This mitigates that problem by waiting for sysfs to come up if a DSA switch is found
if [ -n "$(devlink -j dev info | jq -r '.info.[].driver' | grep -q mv88e6085)" ]; then
timeout=50
while [ -z "$(ls /sys/class/net/*/dsa/tagging)" ]; do
timeout=$((timeout-1))
if [ $timeout -eq 0 ]; then
logger -k -p user.emerg -t "$ident" "Failed to find DSA interface"
exit 1
fi
sleep 0.1
done
logger -k -p user.notice -t "$ident" "Found DSA interface in $timeout seconds"
fi
# Find CPU interfaces used for connecting to a switch managed by DSA
for netif in /sys/class/net/*; do
iface=$(basename "$netif")
@@ -1,102 +1,16 @@
#!/bin/sh
# Run .cfg migration jq scripts to backup and transform older .cfg files
ident=$(basename "$0")
MIGRATIONS_DIR="/usr/share/confd/migrate"
# Check if /cfg/startup-config.cfg needs to be migrated to new syntax.
# Backup of the original is created in /cfg/backup/ for old versions,
# the migrate tool inserts old version in name before .cfg extension.
CONFIG_FILE="/cfg/startup-config.cfg"
BACKUP_DIR="/cfg/backup"
note()
{
logger -I $$ -k -p user.notice -t "$ident" "$1"
}
err()
{
logger -I $$ -k -p user.err -t "$ident" "$1"
}
file_version()
{
jq -r '
if .["infix-meta:meta"] | has("version") then
.["infix-meta:meta"]["version"]
else
"0.0"
end
' "$1"
}
atoi()
{
echo "$1" | awk -F. '{print $1 * 1000 + $2}'
}
BACKUP_FILE="/cfg/backup/startup-config.cfg"
mkdir -p "$(dirname "$BACKUP_FILE")"
if [ ! -f "$CONFIG_FILE" ]; then
# Nothing to migrate
note "No $(basename "$CONFIG_FILE" .cfg) yet, likely factory reset."
exit 0
fi
cfg_version=$(file_version "$CONFIG_FILE")
current_version=$(atoi "$cfg_version")
# Find the latest version by examining the highest numbered directory
sys_version=$(find "$MIGRATIONS_DIR" -mindepth 1 -maxdepth 1 -type d | sort -V | tail -n1 | xargs -n1 basename)
latest_version=$(atoi "$sys_version")
# Check for downgrade
if [ "$current_version" -gt "$latest_version" ]; then
err "Configuration file $CONFIG_FILE version ($cfg_version) is newer than the latest supported version ($sys_version). Exiting."
exit 1
fi
# If the current version is already the latest, exit the script
if [ "$current_version" -eq "$latest_version" ]; then
note "Configuration is already at the latest version ($sys_version). No migration needed."
elif migrate -cq "$CONFIG_FILE"; then
exit 0
fi
note "Configuration file $CONFIG_FILE is of version $cfg_version, migrating ..."
# Create the backup directory if it doesn't exist
mkdir -p "$BACKUP_DIR"
# Create a backup of the current configuration file
nm=$(basename "$CONFIG_FILE" .cfg)
BACKUP_FILE="$BACKUP_DIR/${nm}-${cfg_version}.cfg"
if cp "$CONFIG_FILE" "$BACKUP_FILE"; then
note "Backup created: $BACKUP_FILE"
else
err "Failed creating backup: $BACKUP_FILE"
exit 1
fi
# Apply the scripts for each version directory in sequence
for version_dir in $(find "$MIGRATIONS_DIR" -mindepth 1 -maxdepth 1 -type d | sort -V); do
dir=$(basename "$version_dir")
version=$(atoi "$dir")
# Step by step upgrade file to latest version
if [ "$current_version" -lt "$version" ]; then
note "Applying migrations for version $dir ..."
# Apply all scripts in the version directory in order
for script in $(find "$version_dir" -type f -name '*.sh' | sort -V); do
note "Calling $script for $CONFIG_FILE ..."
sh "$script" "$CONFIG_FILE"
done
# File now at $version ...
current_version="$version"
fi
done
# Update the JSON file to the latest version
if jq --arg version "$sys_version" '.["infix-meta:meta"]["infix-meta:version"] = $version' "$CONFIG_FILE" \
> "${CONFIG_FILE}.tmp" && mv "${CONFIG_FILE}.tmp" "$CONFIG_FILE"; then
note "Configuration updated to version $sys_version."
else
err "Failed updating configuration to version $sys_version!"
exit 1
fi
migrate -i -b "$BACKUP_FILE" "$CONFIG_FILE"
+1 -1
View File
@@ -146,7 +146,7 @@ mount_overlay home "$cfgsrc" /home
mount_overlay root "$cfgsrc" /root
mount_bind "$varsrc" /var
[ "$vlibsrc" ] && mount_bind "$vlibsrc" /var/lib
[ -n "$vlibsrc" ] && mount_bind "$vlibsrc" /var/lib
for tag in $(ls /sys/bus/virtio/devices/*/mount_tag 2>/dev/null); do
if [ "$(cat $tag | tr -d '\0')" = hostfs ]; then
@@ -17,6 +17,13 @@ device
- Initializes auxiliary and configuration filesystems and metadata
- Installs Infix to both primary and secondary partitions
To run this script again (on an already provisioned system), erase the
partition table, reboot and netboot Infix again.
Example:
sudo sgdisk --zap-all /dev/mmcblk0
EOF
}
+35 -5
View File
@@ -33,8 +33,8 @@ unpack_archive()
esac
if [ ! -e "$file" ]; then
if [ -e "/var/lib/conatainers/oci/$file" ]; then
file="/var/lib/conatainers/oci/$file"
if [ -e "/var/lib/containers/oci/$file" ]; then
file="/var/lib/containers/oci/$file"
elif [ -e "/lib/oci/$file" ]; then
file="/lib/oci/$file"
else
@@ -280,6 +280,7 @@ commands:
help Show this help text
list [image | oci] List names (only) of containers, images, or OCI archives
load [NAME | URL] NM Load OCI tarball fileNAME or URL to image NM
locate Find container that currently owns '--net IFNAME'
remove IMAGE Remove an (unused) container image
restart [network] NAME Restart a (crashed) container or container(s) using network
run NAME [CMD] Run a container interactively, with an optional command
@@ -474,6 +475,23 @@ case $cmd in
exit 1
fi
;;
locate) # Find where the host's ifname lives
if [ -z "$network" ]; then
echo "Missing --net IFNAME option."
exit 1
fi
containers=$(podman ps $all --format "{{.Names}}")
for c in $containers; do
json=$(podman inspect "$c")
nets=$(echo "$json" |jq -r '.[].NetworkSettings.Networks | keys[]' 2>/dev/null)
for n in $nets; do
if [ "$network" = "$n" ]; then
echo "$c"
exit 0;
fi
done
done
;;
ls | list)
cmd=$1
[ -n "$cmd" ] && shift
@@ -608,20 +626,32 @@ case $cmd in
podman stats -i 2
;;
upgrade)
# Start script used to initially create container
script=/var/lib/containers/active/S01-${1}.sh
# Find container image
img=$(podman inspect "$1" | jq -r .[].ImageName)
if [ -z "$img" ]; then
echo "No such container ($1), or invalid ImageName. Cannot upgrade."
exit 1;
fi
# Likely an OCI archive, or local directory, assume user has updated image.
if echo "$img" | grep -Eq '^localhost/'; then
# Likely an OCI archive, or local directory, assume user has updated image.
file=$(awk '{s=$NF} END{print s}' "/var/lib/containers/active/${1}.sh")
file=$(awk '{s=$NF} END{print s}' "$script")
echo "Upgrading container ${1} with local archive: $file ..."
else
printf ">> Stopping ... "
podman stop "$1"
printf ">> "
podman pull "$img" || (echo "Failed fetching $img, check your network (settings)."; exit 1)
fi
"/var/lib/containers/active/${1}.sh" || (echo "Failed recreating container $1"; exit 1)
echo ">> Starting $1 ..."
if ! "$script"; then
echo ">> Failed recreating container $1"
exit 1
fi
echo ">> Done."
;;
volume)
cmd=$1
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
# Sort and collate all /etc/frr/static.d/*.conf files managed by confd,
# udhcpc, and avahi-autoipd before starting staticd.
DIRD=/etc/frr/static.d
NAME=/etc/frr/staticd.conf
NEXT=${NAME}+
rm -f "$NEXT"
find "$DIRD" -type f -name '*.conf' ! -name '*~' | sort | while read -r file; do
cat "$file" >> "$NEXT"
done
cmp -s "$NAME" "$NEXT" && exit 0
mv "$NEXT" "$NAME"
@@ -7,9 +7,12 @@ ACTION="$1"
IP_CACHE="/var/lib/misc/${interface}.cache"
RESOLV_CONF="/run/resolvconf/interfaces/${interface}.conf"
NTPFILE="/run/chrony/dhcp-sources.d/${interface}.sources"
NAME="/etc/frr/static.d/${interface}-dhcp.conf"
NEXT="${NAME}+"
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] || subnet=32
[ -n "$metric" ] || metric=100
[ -n "$metric" ] || metric=5
# Handle stateful DHCPv6 like DHCPv4
[ -n "$ipv6" ] && ip="$ipv6/128"
@@ -23,7 +26,7 @@ log()
logger -I $$ -t udhcpc -p user.notice "$*"
}
wwait_for_ipv6_default_route()
wait_for_ipv6_default_route()
{
log "waiting for IPv6 default route to be installed."
while [ $IF_WAIT_DELAY -gt 0 ]; do
@@ -42,28 +45,35 @@ wwait_for_ipv6_default_route()
# client MUST ignore the Router option.
set_dhcp_routes()
{
echo "! Generated by udhcpc" > "$NEXT"
if [ -n "$staticroutes" ]; then
# format: dest1/mask gw1 ... destn/mask gwn
set -- $staticroutes
while [ -n "$1" -a -n "$2" ]; do
log "adding route $1 via $2 dev $interface proto dhcp"
ip route add "$1" via "$2" dev $interface metric $metric proto dhcp
echo "ip route $1 $2 $metric tag 100" >> "$NEXT"
shift 2
done
elif [ -n "$router" ] ; then
for i in $router ; do
ip route add default via $i dev $interface metric $((metric++)) proto dhcp
echo "ip route 0.0.0.0/0 $i $metric tag 100" >> "$NEXT"
done
fi
# Reduce changes needed by comparing with previous route(s)
cmp -s "$NAME" "$NEXT" && return
mv "$NEXT" "$NAME"
initctl -nbq restart staticd
}
clr_dhcp_routes()
{
log "deleting DHCP routes from $interface"
ip route show proto dhcp dev $interface | while read rt via nh dev dev; do
log "removing $rt nh $nh on $dev"
ip route del $rt via $nh dev $dev proto dhcp
done
[ -f "$NAME" ] || return
rm "$NAME"
initctl -nbq restart staticd
}
clr_dhcp_addresses()
@@ -112,7 +122,6 @@ case "$ACTION" in
wait_for_ipv6_default_route
fi
clr_dhcp_routes
set_dhcp_routes
# set hostname if given
+6 -2
View File
@@ -1,4 +1,4 @@
echo "Press Ctrl-C NOW to enter boot menu"
echo "Press Ctrl-C NOW to override the default boot sequence"
if sleep "${ixbootdelay}"; then
run ixbootorder
@@ -7,8 +7,12 @@ if sleep "${ixbootdelay}"; then
reset
fi
bootmenu
if test "${dev_mode}" != "yes"; then
bootmenu
pause "Console shell access PROHIBITED. Press any key to reset..."
reset
fi
echo
echo 'Run "bootmenu" to interactively select a boot device'
echo
+7 -3
View File
@@ -1,16 +1,20 @@
setenv autoload no
if dhcp; then
if test -n "${ipaddr}" || dhcp; then
setenv proto tftp
setenv dltool tftpboot
setenv dlfile "${bootfile}"
if setexpr proto sub "^(http|tftp)://.*" "\\1" "${bootfile}" && setexpr bootfile sub "^(http|tftp)://([^/]+?)/(.*)" "\2:\3"; then
if setexpr proto sub "^(http|tftp)://.*" "\\1" "${bootfile}"; then
if test "${proto}" = "http"; then
setenv dltool wget
setexpr dlfile sub "^http://([^/]+?)/(.*)" "\\1:/\\2" "${bootfile}"
else
setexpr dlfile sub "^tftp://([^/]+?)/(.*)" "\\1:\\2" "${bootfile}"
fi
fi
if ${dltool} ${ramdisk_addr_r} "${bootfile}"; then
if ${dltool} ${ramdisk_addr_r} "${dlfile}"; then
setenv old_fdt_addr ${fdt_addr}
if fdt addr ${ramdisk_addr_r}; then
fdt get value sqoffs /images/rootfs data-position
+2
View File
@@ -260,6 +260,8 @@ CONFIG_CRYPTO_GCM=y
CONFIG_DEBUG_KERNEL=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_TIMEOUT=20
CONFIG_DETECT_HUNG_TASK=y
CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
# CONFIG_FTRACE is not set
+7 -3
View File
@@ -14,6 +14,7 @@ BR2_INIT_FINIT=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt ${BR2_EXTERNAL_INFIX_PATH}/board/common/xattrs"
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
BR2_ROOTFS_MERGED_USR=y
BR2_SYSTEM_BIN_SH_BASH=y
BR2_TARGET_GENERIC_GETTY_PORT="@console"
BR2_TARGET_GENERIC_GETTY_TERM="xterm"
@@ -24,14 +25,13 @@ BR2_TARGET_TZ_INFO=y
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/rootfs"
BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
BR2_ROOTFS_MERGED_USR=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.46"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.52"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/linux_defconfig"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="alder/alder styx/styx marvell/armada-3720-espressobin marvell/armada-3720-espressobin-emmc marvell/armada-3720-espressobin-v7 marvell/armada-3720-espressobin-v7-emmc marvell/armada-3720-espressobin-ultra marvell/cn9130-crb-A marvell/cn9130-crb-B microchip/sparx5_pcb135_emmc_no_psci"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="alder/alder styx/dcp-sc-28p-a styx/dcp-sc-28p-b marvell/armada-3720-espressobin marvell/armada-3720-espressobin-emmc marvell/armada-3720-espressobin-v7 marvell/armada-3720-espressobin-v7-emmc marvell/armada-3720-espressobin-ultra marvell/cn9130-crb-A marvell/cn9130-crb-B microchip/sparx5_pcb135_emmc_no_psci"
BR2_LINUX_KERNEL_CUSTOM_DTS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/dts"
BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME=y
BR2_LINUX_KERNEL_INSTALL_TARGET=y
@@ -131,7 +131,9 @@ INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_CONFD_TEST_MODE=y
BR2_PACKAGE_CURIOS_HTTPD=y
BR2_PACKAGE_CURIOS_NFTABLES=y
BR2_PACKAGE_EXECD=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
@@ -140,6 +142,8 @@ BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD=y
BR2_PACKAGE_FINIT_PLUGIN_RTC=y
BR2_PACKAGE_FINIT_RTC_DATE="2024-11-04 10:54:00"
BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
+141
View File
@@ -0,0 +1,141 @@
BR2_aarch64=y
BR2_ARM_FPU_VFPV4=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY=y
BR2_DL_DIR="${BR2_EXTERNAL_INFIX_PATH}/dl"
BR2_CCACHE=y
BR2_CCACHE_DIR="${BR2_EXTERNAL_INFIX_PATH}/.ccache"
BR2_ENABLE_DEBUG=y
BR2_GLOBAL_PATCH_DIR="${BR2_EXTERNAL_INFIX_PATH}/patches"
BR2_TARGET_GENERIC_HOSTNAME="ix"
BR2_TARGET_GENERIC_ISSUE="Infix by KernelKit"
BR2_INIT_FINIT=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt ${BR2_EXTERNAL_INFIX_PATH}/board/common/xattrs"
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
BR2_ROOTFS_MERGED_USR=y
BR2_SYSTEM_BIN_SH_BASH=y
BR2_TARGET_GENERIC_GETTY_PORT="@console"
BR2_TARGET_GENERIC_GETTY_TERM="xterm"
BR2_SYSTEM_DHCP="eth0"
BR2_ENABLE_LOCALE_WHITELIST="C en_US en_CA C.UTF-8"
BR2_GENERATE_LOCALE="en_US en_CA C.UTF-8"
BR2_TARGET_TZ_INFO=y
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/rootfs"
BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.52"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/linux_defconfig"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="alder/alder styx/dcp-sc-28p-a styx/dcp-sc-28p-b marvell/armada-3720-espressobin marvell/armada-3720-espressobin-emmc marvell/armada-3720-espressobin-v7 marvell/armada-3720-espressobin-v7-emmc marvell/armada-3720-espressobin-ultra marvell/cn9130-crb-A marvell/cn9130-crb-B microchip/sparx5_pcb135_emmc_no_psci"
BR2_LINUX_KERNEL_CUSTOM_DTS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/dts"
BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME=y
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_PACKAGE_BUSYBOX_CONFIG="${BR2_EXTERNAL_INFIX_PATH}/board/common/busybox_defconfig"
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_STRESS_NG=y
BR2_PACKAGE_JQ=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_DBUS_CXX=y
BR2_PACKAGE_DBUS_GLIB=y
BR2_PACKAGE_DBUS_TRIGGERD=y
BR2_PACKAGE_EUDEV_RULES_GEN=y
# BR2_PACKAGE_EUDEV_ENABLE_HWDB is not set
BR2_PACKAGE_GPTFDISK=y
BR2_PACKAGE_GPTFDISK_SGDISK=y
BR2_PACKAGE_MDIO_TOOLS=y
BR2_PACKAGE_RNG_TOOLS=y
BR2_PACKAGE_UBOOT_TOOLS=y
BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN=y
BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE=y
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_LIBSSH_OPENSSL=y
BR2_PACKAGE_LIBSSH2=y
BR2_PACKAGE_LIBSSH2_OPENSSL=y
BR2_PACKAGE_LIBXCRYPT=y
BR2_PACKAGE_LIBOPENSSL_BIN=y
BR2_PACKAGE_LIBCURL_CURL=y
BR2_PACKAGE_NETOPEER2_CLI=y
BR2_PACKAGE_NSS_MDNS=y
BR2_PACKAGE_LINUX_PAM=y
BR2_PACKAGE_ONIGURUMA=y
BR2_PACKAGE_AVAHI_DAEMON=y
BR2_PACKAGE_AVAHI_DEFAULT_SERVICES=y
BR2_PACKAGE_CHRONY=y
BR2_PACKAGE_DNSMASQ=y
BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_FRR=y
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_IPUTILS=y
BR2_PACKAGE_LLDPD=y
BR2_PACKAGE_NETCALC=y
BR2_PACKAGE_NGINX=y
BR2_PACKAGE_NGINX_HTTP_SSL_MODULE=y
BR2_PACKAGE_NGINX_HTTP_V2_MODULE=y
BR2_PACKAGE_OPENRESOLV=y
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_SOCAT=y
BR2_PACKAGE_TCPDUMP=y
BR2_PACKAGE_WHOIS=y
BR2_PACKAGE_BASH_COMPLETION=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_KMOD_TOOLS=y
BR2_PACKAGE_PWGEN=y
BR2_PACKAGE_RAUC=y
BR2_PACKAGE_RAUC_DBUS=y
BR2_PACKAGE_RAUC_GPT=y
BR2_PACKAGE_RAUC_NETWORK=y
BR2_PACKAGE_SYSKLOGD=y
BR2_PACKAGE_SYSKLOGD_LOGGER=y
BR2_PACKAGE_WATCHDOGD=y
BR2_PACKAGE_LESS=y
BR2_PACKAGE_MG=y
BR2_PACKAGE_NANO=y
BR2_TARGET_ROOTFS_SQUASHFS=y
# BR2_TARGET_ROOTFS_TAR is not set
BR2_PACKAGE_HOST_E2FSPROGS=y
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
BR2_PACKAGE_HOST_GENEXT2FS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_RAUC=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
INFIX_VENDOR_HOME="https://github.com/kernelkit"
INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling."
INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_CONFD_TEST_MODE=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
BR2_PACKAGE_FACTORY=y
BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD=y
BR2_PACKAGE_FINIT_PLUGIN_RTC=y
BR2_PACKAGE_FINIT_RTC_DATE="2024-11-04 10:54:00"
BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
BR2_PACKAGE_KEYACK=y
BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
BR2_PACKAGE_LOWDOWN=y
BR2_PACKAGE_MCD=y
BR2_PACKAGE_MDNS_ALIAS=y
BR2_PACKAGE_LIBINPUT=y
BR2_PACKAGE_ROUSETTE=y
DISK_IMAGE_BOOT_BIN=y
TRUSTED_KEYS=y
TRUSTED_KEYS_DEVELOPMENT=y
GNS3_APPLIANCE_RAM=512
GNS3_APPLIANCE_IFNUM=10
+2
View File
@@ -183,6 +183,8 @@ BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD=y
BR2_PACKAGE_FINIT_PLUGIN_RTC=y
BR2_PACKAGE_FINIT_RTC_DATE="2024-11-04 10:54:00"
BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
+4 -3
View File
@@ -11,8 +11,8 @@ BR2_TARGET_GENERIC_ISSUE="Infix by KernelKit"
BR2_INIT_FINIT=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt ${BR2_EXTERNAL_INFIX_PATH}/board/common/xattrs"
BR2_ROOTFS_MERGED_USR=y
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
BR2_ROOTFS_MERGED_USR=y
BR2_SYSTEM_BIN_SH_BASH=y
BR2_TARGET_GENERIC_GETTY_PORT="@console"
BR2_TARGET_GENERIC_GETTY_TERM="xterm"
@@ -65,9 +65,7 @@ BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN=y
BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE=y
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON_GUNICORN=y
BR2_PACKAGE_LIBSSH_OPENSSL=y
BR2_PACKAGE_LIBSSH2=y
BR2_PACKAGE_LIBSSH2_OPENSSL=y
BR2_PACKAGE_LIBXCRYPT=y
BR2_PACKAGE_LIBOPENSSL_BIN=y
BR2_PACKAGE_LIBINPUT=y
@@ -166,6 +164,7 @@ INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_CONFD=y
# BR2_PACKAGE_CONFD_TEST_MODE is not set
BR2_PACKAGE_EXECD=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
@@ -174,6 +173,8 @@ BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD=y
BR2_PACKAGE_FINIT_PLUGIN_RTC=y
BR2_PACKAGE_FINIT_RTC_DATE="2024-11-04 10:54:00"
BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
+7 -2
View File
@@ -13,6 +13,7 @@ BR2_INIT_FINIT=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt ${BR2_EXTERNAL_INFIX_PATH}/board/common/xattrs"
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
BR2_ROOTFS_MERGED_USR=y
BR2_SYSTEM_BIN_SH_BASH=y
BR2_TARGET_GENERIC_GETTY_PORT="@console"
BR2_TARGET_GENERIC_GETTY_TERM="xterm"
@@ -23,10 +24,9 @@ BR2_TARGET_TZ_INFO=y
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/rootfs"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
BR2_ROOTFS_MERGED_USR=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.46"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.52"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/linux_defconfig"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
@@ -57,6 +57,7 @@ BR2_PACKAGE_LIBSSH2_OPENSSL=y
BR2_PACKAGE_LIBXCRYPT=y
BR2_PACKAGE_LIBOPENSSL_BIN=y
BR2_PACKAGE_LIBCURL_CURL=y
BR2_PACKAGE_LIBMNL=y
BR2_PACKAGE_NETOPEER2_CLI=y
BR2_PACKAGE_NSS_MDNS=y
BR2_PACKAGE_LINUX_PAM=y
@@ -134,7 +135,9 @@ INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_CONFD_TEST_MODE=y
BR2_PACKAGE_CURIOS_HTTPD=y
BR2_PACKAGE_CURIOS_NFTABLES=y
BR2_PACKAGE_EXECD=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
@@ -143,6 +146,8 @@ BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD=y
BR2_PACKAGE_FINIT_PLUGIN_RTC=y
BR2_PACKAGE_FINIT_RTC_DATE="2024-11-04 10:54:00"
BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
+143
View File
@@ -0,0 +1,143 @@
BR2_x86_64=y
BR2_x86_corei7=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY=y
BR2_DL_DIR="${BR2_EXTERNAL_INFIX_PATH}/dl"
BR2_CCACHE=y
BR2_CCACHE_DIR="${BR2_EXTERNAL_INFIX_PATH}/.ccache"
BR2_ENABLE_DEBUG=y
BR2_GLOBAL_PATCH_DIR="${BR2_EXTERNAL_INFIX_PATH}/patches"
BR2_TARGET_GENERIC_HOSTNAME="ix"
BR2_TARGET_GENERIC_ISSUE="Infix by KernelKit"
BR2_INIT_FINIT=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt ${BR2_EXTERNAL_INFIX_PATH}/board/common/xattrs"
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
BR2_ROOTFS_MERGED_USR=y
BR2_SYSTEM_BIN_SH_BASH=y
BR2_TARGET_GENERIC_GETTY_PORT="@console"
BR2_TARGET_GENERIC_GETTY_TERM="xterm"
BR2_SYSTEM_DHCP="eth0"
BR2_ENABLE_LOCALE_WHITELIST="C en_US en_CA C.UTF-8"
BR2_GENERATE_LOCALE="en_US en_CA C.UTF-8"
BR2_TARGET_TZ_INFO=y
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/rootfs"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.52"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/linux_defconfig"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
BR2_PACKAGE_BUSYBOX_CONFIG="${BR2_EXTERNAL_INFIX_PATH}/board/common/busybox_defconfig"
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_STRESS_NG=y
BR2_PACKAGE_JQ=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_DBUS_CXX=y
BR2_PACKAGE_DBUS_GLIB=y
BR2_PACKAGE_DBUS_TRIGGERD=y
BR2_PACKAGE_EUDEV_RULES_GEN=y
# BR2_PACKAGE_EUDEV_ENABLE_HWDB is not set
BR2_PACKAGE_GPTFDISK=y
BR2_PACKAGE_GPTFDISK_SGDISK=y
BR2_PACKAGE_RNG_TOOLS=y
BR2_PACKAGE_UBOOT_TOOLS=y
BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN=y
BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE=y
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_LIBSSH_OPENSSL=y
BR2_PACKAGE_LIBSSH2=y
BR2_PACKAGE_LIBSSH2_OPENSSL=y
BR2_PACKAGE_LIBXCRYPT=y
BR2_PACKAGE_LIBOPENSSL_BIN=y
BR2_PACKAGE_LIBCURL_CURL=y
BR2_PACKAGE_LIBMNL=y
BR2_PACKAGE_NETOPEER2_CLI=y
BR2_PACKAGE_NSS_MDNS=y
BR2_PACKAGE_LINUX_PAM=y
BR2_PACKAGE_ONIGURUMA=y
BR2_PACKAGE_AVAHI_DAEMON=y
BR2_PACKAGE_AVAHI_DEFAULT_SERVICES=y
BR2_PACKAGE_CHRONY=y
BR2_PACKAGE_DNSMASQ=y
BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_FRR=y
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_IPUTILS=y
BR2_PACKAGE_LLDPD=y
BR2_PACKAGE_NETCALC=y
BR2_PACKAGE_NGINX=y
BR2_PACKAGE_NGINX_HTTP_SSL_MODULE=y
BR2_PACKAGE_NGINX_HTTP_V2_MODULE=y
BR2_PACKAGE_OPENRESOLV=y
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_SOCAT=y
BR2_PACKAGE_TCPDUMP=y
BR2_PACKAGE_WHOIS=y
BR2_PACKAGE_BASH_COMPLETION=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_KMOD_TOOLS=y
BR2_PACKAGE_PWGEN=y
BR2_PACKAGE_RAUC=y
BR2_PACKAGE_RAUC_DBUS=y
BR2_PACKAGE_RAUC_GPT=y
BR2_PACKAGE_RAUC_NETWORK=y
BR2_PACKAGE_SYSKLOGD=y
BR2_PACKAGE_SYSKLOGD_LOGGER=y
BR2_PACKAGE_WATCHDOGD=y
BR2_PACKAGE_LESS=y
BR2_PACKAGE_MG=y
BR2_PACKAGE_NANO=y
BR2_TARGET_ROOTFS_SQUASHFS=y
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_EDK2=y
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_X86_64_EFI=y
BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI="boot linux ext2 squash4 part_gpt normal efi_gop configfile loadenv test echo reboot net efinet tftp loopback cat search"
BR2_TARGET_GRUB2_BUILTIN_CONFIG_EFI="${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/grub-embed.cfg"
BR2_TARGET_GRUB2_INSTALL_TOOLS=y
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_E2FSPROGS=y
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
BR2_PACKAGE_HOST_GENEXT2FS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_HOST_RAUC=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
INFIX_VENDOR_HOME="https://github.com/kernelkit"
INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling."
INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_CONFD_TEST_MODE=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
BR2_PACKAGE_FACTORY=y
BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD=y
BR2_PACKAGE_FINIT_PLUGIN_RTC=y
BR2_PACKAGE_FINIT_RTC_DATE="2024-11-04 10:54:00"
BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
BR2_PACKAGE_KEYACK=y
BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
BR2_PACKAGE_LOWDOWN=y
BR2_PACKAGE_MCD=y
BR2_PACKAGE_MDNS_ALIAS=y
BR2_PACKAGE_ROUSETTE=y
TRUSTED_KEYS=y
TRUSTED_KEYS_DEVELOPMENT=y
GNS3_APPLIANCE_RAM=512
GNS3_APPLIANCE_IFNUM=10
+213 -3
View File
@@ -4,6 +4,213 @@ Change Log
All notable changes to the project are documented in this file.
[v24.10.2][UNRELEASED]
-------------------------
### Changes
- Support for showing interfaces owned by running containers in the CLI
command `show interfaces`. This also adds support for showing the
peer interface of VETH pairs. Issue #626
- Reboot system on kernel "oops", on "oops" the kernel now panics and
reboots after 20 seconds. Issue #740
- Update static factory-config for NanoPi R2S: enable NACM, securing all
passwords, and enabling `iburst` for the NTP client. Issue #750
- Updated QoS documentation with pictures and more information on VLAN
interface ingress/egress priority handling, issue #759
- Disable RTC device in Styx device tree, issue #794
- Support for saving and restoring system clock from a disk file. This
allows restoring the system clock to a sane date in case the RTC is
disabled or does not have a valid time, issue #794
### Fixes
- Fix #685: DSA conduit interface not always detected, randomly causing
major issues configuring systems with multiple switch cores
- Fix #778: reactivate OpenSSL backend for libssh/libssh2 for NanoPI R2S.
This fixes a regression in v24.10.0 causing loss of NETCONF supprt
[v24.10.1][] - 2024-10-18
-------------------------
### Changes
- Add support for interface description, sometimes referred to as
"ifAlias". Saved as an Linux interface alias (not `altname`), e.g.,
`/sys/class/interfaces/veth0a/ifalias`, includes operational support
### Fixes
- Fix #735: `copy` and `erase` commands missing from CLI, regression
in Infix v24.10.0 defconfigs, now added as dep. in klish package
[v24.10.0][] - 2024-10-18
-------------------------
**News:** this release contains *breaking YANG changes* in custom MAC
addresses for interfaces! For details, see below issue #680.
Also, heads-up to all downstream users of Infix. YANG models have been
renamed to ease maintenance, more info below.
### Changes
- Software control of port LEDs on the Styx platform has been disabled.
Default driver behavior, green link and green traffic blink, is kept
as-is, which should mitigate issues reported in #670
- Correcting documentation on QoS. For packets containing both a VLAN
tag and an IP header, PCP priority takes precedence over DSCP
priority (not vice versa).
- Update CONTRIBUTING.md for scaling core team and helping external
contributors understand the development process, issue #672
- Updated branding documentation with more information on how dynamic
and static factory-config work, including examples
- Updated container documentation, improved images, detail how to set
interface name inside the container, and some syntax fixes
- Updated networking documentation, new General settings section, and
more details added to initial section on network building blocks
- As of this release, all Infix YANG models have dropped the `@DATE`
suffix from the name, this type of versioning is not handled using
symlinks instead.
- Update Infix `provision` script, used to install Infix on eMMC, add
example of how to erase partition table to be able to re-run the
script on already provisioned devices, issue #671
- OSPF: Add limitation to allow an interface to be in one area only
- Add support for "dummy" interfaces, mostly useful for testing
- Add support for container hostname format specifiers, just like it
already works for the host's hostname setting
- Hide all `status obsolete` YANG nodes in CLI
- Add YANG `units`, if available, to CLI help text (default value)
- The CLI commands `copy` and `erase` are now available also from Bash
- Greatly reduced size of bundled curiOS httpd OCI container image,
reduced from 1.8 MiB to 281 KiB
- Add deviation to ietf-interfaces.yang, `link-up-down-trap-enable` is
not supported (yet) in Infix, issue #709
- The default builds now include the curiOS nftables container image,
which can be used for advanced firewall setups. For an introduction
see <https://kernelkit.org/posts/firewall-container/>
### Fixes
- Fix #499: add an NACM rule to factory-config, which by default deny
everyone to read user password hash(es)
- Fix #663: internal Ethernet interfaces shown in CLI tab completion
- Fix #674: CLI `show interfaces` display internal Ethernet interfaces,
regression introduced late in v24.09 release cycle
- Fix #676: port dropped from bridge when changing its VLAN membership
from tagged to untagged
- Fix #680: replace deviation for `phys-address` in ietf-interfaces.yang
with `custom-phys-address` to allow for constructing more free-form
MAC addresses based on the chassis MAC (a.k.a., base MAC) address.
For more information, see the YANG model, a few examples are listed in
the updated documentation.
The syntax will be automatically updated in the `startup-config` and
`factory-config` -- make sure to verify the changes and update any
static `factory-config` used for your products
- Fix #690: CLI `show ip route` command stops working after 24 hours,
this includes all operational data in ietf-routing:/routing/ribs.
- Fix #697: password is not always set for new users, bug introduced
in v24.06.0 when replacing Augeas with native user handling
- Fix #700: add missing `admin-status` to interface operational data
- Fix #701: make sure CLI (and Bash) `copy` command use same sysrepo
timeout as other operations that load sysrepo. Was 10 second timeout,
which caused some (really big) configurations not to apply from the
CLI, but worked at boot, for instance. New timeout is 60 seconds
- Fix #708: allow all container networks to set interface name inside
container, not just auto-generated veth-pair ends for `docker0` bridge
- Fix `show interfaces` on platforms like the NanoPi R2S, which does not
support reading RMON counters in JSON format using `ethtool`
- Fix #730: CLI command `show ntp [sources]` stopped working in v24.08.
Missing access rights after massive CLI lock-down
- Fix BFD in OSPF, previously you could not enable BFD on a single
interface without enabling it on all interfaces
[v24.09.0][] - 2024-09-30
-------------------------
**News:** this release enhances the integration of all types of static
routes with FRRouting ([Frr][]), including all routes that can be set by
DHCP and IPvLL (ZeroConf) clients. Due to this fundamental change, the
system routing table is now primarily read from Frr, which increases the
amount of relevant routing information available to the user. E.g., in
the CLI exec command `show ip route` and `show ipv6 route`. Support for
adjusting the administrative distance of all types of static routes has
also been added to facilitate site specific adaptations. Please see the
documentation for details.
### Known Issues
- The CLI command `show interfaces` may for some terminal resolutions
not display all interfaces (on systems with >20 interfaces). This
problem is limited to the console port and only occurs for smaller
terminals (30-50 rows height). Calling `show ifaces` from the shell,
dumping `/ietf-interfaces:interfaces` XPath using `sysrepocfg`, or
using the CLI from an SSH session, is not affected. Issue #659
### Changes
- Upgrade Buildroot to 2024.02.6 (LTS)
- Upgrade Linux kernel to 6.6.52 (LTS)
- Upgrade libyang to 3.4.2
- Upgrade sysrepo to 2.11.7
- Upgrade netopeer2 (NETCONF) to 2.2.31
- Updated `infix-routing.yang` to declare deviations for unsupported
OSPF RPCs and Notifications in `ietf-ospf.yang`
- The CLI admin-exec command `show dns` now also shows any configured
name servers, not just ones acquired via DHCP. Issue #510
- Add support for IPv4 (autoconf) `request-address`. This instructs the
ZeroConf client to start with the requested address. If this is not
successful the client falls back to its default behavior. Issue #628
- Major speedup (10x) in operational data, in particular when querying
interface status. Very noticeable in the CLI `show interfaces`
command on devices with large port counts. Issue #651
- Silence `yanger` log warnings for failing `mctl` command. Caused
by `mctl` reporting no multicast filtering enabled on bridge
### Fixes
- Fix #357: EUI-64 based IPv6 autoconf address on bridges seem to be
randomized. Problem caused by kernel setting a random MAC before any
bridge port is added. Fixed by using the device's base MAC address on
bridge interfaces. Possible to override using `phys-address` option
- Fix #601: CLI regression in `show ospf` family of commands causing
authorized users, like `admin`, to not being able to query status
of OSPF or BFD. Workaround by using the UNIX shell `sudo vtysh`.
Regression introduced in v24.08.0
- Fix #603: regression in GNS3 image, starts in test mode by default.
Introduced in v24.08.
- Fix #613: CLI regression in tab completion of container commands,
e.g., `container shell <TAB>`. Regression introduced in v24.08.0
- Fix #616: Silent failure when selecting bash as login shell for
non-admin user, this silent lock has been removed
- Fix #618: CLI command `show interfaces` does not show bridges and
bridge ports, regression introduced in v24.08.0 -- only affects
bridges without multicast snooping
- Fix #623: CLI command `container upgrade NAME` does not work,
regression introduced in v24.06.0
- Fix #625: initialize sysrepo startup datastore at boot. Improves
usability when working directly against the sysrepo datastores from
the shell with `sysrepocfg` and `sysrepoctl` tools
- Fix #635: OSPF: all router neighbors reported as neighbor on every
interface
- Fix #638: Disabling IPv4LL (autoconf) on an interface does not clean
up 169.254/16 addresses
- Fix #640: unable to set static default route due to priority inversion
from DHCP or IPv4LL (ZeroConf) clients setting their routes directly
in the kernel. This has resulted in a complete overhaul of route
management, using FRRouting for all routes, including DHCP and IPv4LL
routes, presentation in the CLI, and also support for custom route
preference for static routes
- Fix #658: deleting VETH pairs does not work unless rebooting first.
Creating a VETH pair, followed by at least one other reconfiguration
before removing the pair, causes `confd` to fail when applying the
interface changes (tries to delete both ends of the pair)
- Spellcheck path to `/var/lib/containers` when unpacking OCI archives
on container upgrade
- cli: restore `tcpdump` permissions for administrator level users,
regression introduced in v24.08.0
- The timeout before giving up on loading the `startup-config` at boot
is now 1 minute, just like operations via other front-ends (NETCONF
and RESTCONF). This was previously (incorrectly) set to 10 seconds
[Frr]: https://frrouting.org/
[v24.08.0][] - 2024-08-30
-------------------------
@@ -22,7 +229,7 @@ Finally, the following consumer boards are now fully supported:
- Upgrade Buildroot to 2024.02.5 (LTS)
- Upgrade Linux kernel to 6.6.46 (LTS)
- Issue #158: enhance security of factory reset. All file content
is now overwritten x3, the last time with zeroes, then removed.
is now overwritten x3, the last time with zeroes, then removed.
Example, on the NanoPi R2S this process takes ~30 seconds, but may
take longer in setups with bigger configurations, e.g., containers
- Issue #497: support for auto-mounting USB media. Useful for logging,
@@ -162,7 +369,7 @@ Finally, the following consumer boards are now fully supported:
- Merge infix-shell-types.yang with infix-system.yang
- cli: improved error/warning message on missing or incomplete command
[yescrypt]: https://en.wikipedia.org/wiki/Yescrypt)
[yescrypt]: https://en.wikipedia.org/wiki/Yescrypt
### Fixes
- Fix #424: regression, root user can log in without password
@@ -1068,7 +1275,10 @@ Supported YANG models in addition to those used by sysrepo and netopeer:
- N/A
[buildroot]: https://buildroot.org/
[UNRELEASED]: https://github.com/kernelkit/infix/compare/v24.08.0...HEAD
[UNRELEASED]: https://github.com/kernelkit/infix/compare/v24.10.1...HEAD
[v24.10.1]: https://github.com/kernelkit/infix/compare/v24.10.0...v24.10.1
[v24.10.0]: https://github.com/kernelkit/infix/compare/v24.09.0...v24.10.0
[v24.09.0]: https://github.com/kernelkit/infix/compare/v24.08.0...v24.09.0
[v24.08.0]: https://github.com/kernelkit/infix/compare/v24.06.0...v24.08.0
[v24.06.0]: https://github.com/kernelkit/infix/compare/v24.04.0...v24.06.0
[v24.04.2]: https://github.com/kernelkit/infix/compare/v24.04.1...v24.04.2
+3 -1
View File
@@ -143,7 +143,7 @@ which offers lots of benefits out-of-the-box:
media like USB sticks or SD-cards) and from remote servers using FTP
or HTTP(S).
To initiate a system upgrade, run:
To initiate a system upgrade from the shell[^1], run:
rauc install <file|url>
@@ -349,3 +349,5 @@ can funtion reasonably well without a persistent `/var`, loosing
If `var` is not available, Infix will still persist `/var/lib` using
`cfg` as the backing storage.
[^1]: See [CLI Upgrade](cli/upgrade.md) for information on upgrading
via CLI.
+192 -6
View File
@@ -41,13 +41,92 @@ Verify the result after a build by inspecting:
printed on a label on the device.
Factory Defaults
----------------
Factory & Failure Config
------------------------
The Infix default configuration, factory-config, is part static files
and part per-device generated files, e.g., SSH hostkey and hostname.
The latter is constructed from the file `/etc/hostname`, appended with
the last three octets of the system's base MAC address. To override the
To support booting the same image (CPU architecture) on multiple boards,
Infix by default generates the device's initial configuration every time
at boot. This also ensures the device can always be restored to a known
state after a factory reset, since the `factory-config` is guaranteed to
be compatible with the YANG models for the given software version. (For
more information on how the system boots, please see the section [Key
Concepts](introduction.md#key-concepts) in the Introduction document.)
However, for custom builds of Infix it is possible to override this with
a single static `/etc/factory-config.cfg` (and failure-config) in your
rootfs overlay -- with a [VPD](vpd.md) you can even support several!
### Variables & Format Specifiers
Parts of the configuration you likely always want to generated, like the
SSH hostkey used by NETCONF, a unique hostname, or the `admin` user's
unique (per-device with a VPD) password hash. This section lists the
available keywords, see the next section for examples of how to use
them:
- **Default password hash:** `$factory$` (from VPD, .dtb, or built-in)
XPath: `/ietf-system:system/authentication/user/password`
- **Default NETCONF hostkey:** `genkey` (regenerated at factory reset)
XPath: `/ietf-keystore:keystore/asymmetric-keys/asymmetric-key[name='genkey']`
- **Hostname format specifiers:**
XPath: `/ietf-system:system/hostname`
- `%i`: OS ID, from `/etc/os-release`, from Menuconfig branding
- `%h`: Default hostname, from `/etc/os-release`, from branding
- `%m`: NIC specific part of base MAC, e.g., to `c0-ff-ee`
- `%%`: Literal %
### Static Files
> **Caveat:** maintaining static a factory-config and failure-config may
> seem like an obvious choice, but as YANG models evolve (even the IETF
> models get upgraded), you may need to upgrade your static files.
First, for one-off builds (one image per product), the simplest way is
to override the location where the system looks for the files, `/etc`
already at build time. This can be done using a Buildroot rootfs
overlay providing, e.g., `/etc/factory-config.cfg`. Example: [NanoPi
R2S][] in `${INFIX}/board/aarch64/r2s/rootfs/etc/factory-config.cfg`.
Second, to support multiple products in a single image, we can employ
another method to install a `/etc/factory-config.cfg` override -- at
runtime. This relies on the very early system `probe` that detects the
specific product from VPD data.
The `probe` consists of several sequential steps that currently run from
`${INFIX}/board/common/rootfs/usr/libexec/infix/init.d/`. One of them
check if `/usr/share/product/<PRODUCT>` exists, and if so attempts to
copy the entire contents to `/`. Here, `<PRODUCT>` is determined from
the VPD, which is available in `/run/system.json` as `"product-name"`,
after `00-probe` has run. The lower case version of the string is used.
I.e., create a rootfs overlay that provides any combination of:
- `/usr/share/product/<PRODUCT>/etc/factory-config.cfg`
- `/usr/share/product/<PRODUCT>/etc/failure-config.cfg`
### Dynamically Generated
The generated `factory-config` and `failure-config` files consist of
both static JSON files and part generated files at runtime for each
device. The resulting files are written to the RAM disk in `/run`:
- `/run/confd/factory-config.gen`
- `/run/confd/failure-config.gen`
Provided no custom overrides (see above) have been installed already,
these files are then copied to:
- `/etc/factory-config.cfg`
- `/etc/failure-config.cfg`
... where the bootstrap process expects them to be in the next step.
Examples of generated contents are the SSH hostkey and hostname. The
latter is constructed from the file `/etc/hostname`, appended with the
last three octets of the system's base MAC address. To override the
base hostname, set `BR2_TARGET_GENERIC_HOSTNAME` in your defconfig.
The static files are installed by Infix `confd` in `/usr/share/confd/`
@@ -97,6 +176,112 @@ bootstrap script for more help, and up-to-date information.
> you may want to look into `GEN_IFACE_OPTS`.
### Example Snippets
**IETF System:**
```hsib
"ietf-system:system": {
"hostname": "example-%m",
"ntp": {
"enabled": true,
"server": [
{
"name": "ntp.org",
"udp": {
"address": "pool.ntp.org"
}
}
]
},
"authentication": {
"user": [
{
"name": "admin",
"password": "$factory$",
"infix-system:shell": "bash"
}
]
},
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCAtLSBhIE5ldHdvcmsgT3BlcmF0aW5nIFN5c3RlbQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQuZ2l0aHViLmlvCictJy0tLSctJwo="
}, # <---- REMEMBER COMMA SEPARATORS IN SNIPPETS!
# <---- ... and no comments.
```
The `motd-banner` is a binary type, which is basically a Base64 encoded
text file without line breaks (`-w0`):
```bash
$ echo "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCAtLSBhIE5ldHdvcmsgT3BlcmF0aW5nIFN5c3RlbQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQuZ2l0aHViLmlvCictJy0tLSctJwo=" |base64 -d
.-------.
| . . | Infix -- a Network Operating System
|-. v .-| https://kernelkit.github.io
'-'---'-'
```
**IETF Keystore**
Notice how both the public and private keys are left empty here. The
`genkey` is always automatically regenerated after each factory reset.
Keeping the `factory-config` snippet like this means we can use the same
file on multiple devices, without risking them sharing the same host
keys. Sometimes you may want the same host keys, but that is the easy
use-case and not documented here.
```json
"ietf-keystore:keystore": {
"asymmetric-keys": {
"asymmetric-key": [
{
"name": "genkey",
"public-key-format": "ietf-crypto-types:ssh-public-key-format",
"public-key": "",
"private-key-format": "ietf-crypto-types:rsa-private-key-format",
"cleartext-private-key": "",
"certificates": {}
}
]
}
},
```
The `genkey` is currently only used by the NETCONF SSH backend.
**IETF NETCONF Server**
```json
"ietf-netconf-server:netconf-server": {
"listen": {
"endpoints": {
"endpoint": [
{
"name": "default-ssh",
"ssh": {
"tcp-server-parameters": {
"local-address": "::"
},
"ssh-server-parameters": {
"server-identity": {
"host-key": [
{
"name": "default-key",
"public-key": {
"central-keystore-reference": "genkey"
}
}
]
}
}
}
}
]
}
}
},
```
Integration
-----------
@@ -203,3 +388,4 @@ variable `INFIX_OEM_PATH` to that of the br2-external. It is also
possible to set the `GIT_VERSION` variable in your `post-build.sh`
script to change how the VCS version is extracted.
[NanoPi R2S]: https://github.com/kernelkit/infix/blob/main/board/aarch64/r2s/rootfs/etc/factory-config.cfg
+70 -37
View File
@@ -1,5 +1,6 @@
Containers in Infix
===================
<img align="right" src="img/docker.webp" alt="Docker whale" width=360>
* [Introduction](#introduction)
* [Caution](#caution)
@@ -75,19 +76,20 @@ Getting Started
In the CLI, containers can be run in one of two ways:
1. `container run IMAGE [COMMAND]`, and
1. `container run IMAGE [COMMAND]`, or
2. enter `configure` context, then `edit container NAME`
The first is useful mostly for testing, or running single commands in an
image. It is a wrapper for `podman run -it --rm ...`, while the latter
is a wrapper and adaptation of `podman create ...`.
The former is useful mostly for testing, or running single commands in
an image. It is a wrapper for `podman run -it --rm ...`, while the
latter is a wrapper and adaptation of `podman create ...`.
The second create a container with a semi-persistent writable layer that
survives container restarts and host system restarts. However, if you
change the container configuration or upgrade the image (see below), the
container will be recreated and the writable layer is lost. This is why
it is recommended to set up a named volume for directories, or use file
[Content Mounts][], in your container you want truly persistent content.
[Content Mounts](#content-mounts), in your container if you want truly
persistent content.
In fact, in many cases the best way is to create a `read-only` container
and use file mounts and volumes only for the critical parts. Podman
@@ -103,11 +105,23 @@ application to run.
> unlike virtualization, containers reuse the host's CPU and kernel.
<img align="right" src="img/docker-hello-world.svg" alt="Hello World" width=360>
### Examples
Classic Hello World:
admin@example:/> container run docker://hello-world
Starting docker://hello-world :: use Ctrl-p Ctrl-q to detach
Trying to pull docker.io/library/hello-world:latest...
Getting image source signatures
Copying blob c1ec31eb5944 done
Copying config d2c94e258d done
Writing manifest to image destination
Storing signatures
Hello from Docker!
This message shows that your installation appears to be working correctly.
Persistent web server using nginx, sharing the host's network:
@@ -132,7 +146,7 @@ container at runtime.
Container Images
----------------
The underlying `podman` project support importing and fetching images in
The underlying `podman` project supports importing and fetching images in
a variety of ways, the most common ones are also supported by Infix. In
this section we present how to use them and in the next section we show
how to upgrade to a newer base image.
@@ -209,7 +223,7 @@ admin-exec context ...
admin@example:/var/tmp$ cli
admin@example:/> container load /var/tmp/curios-oci-amd64.tar.gz name curios:edge
> By assigning The `name curios:edge` is the tag you give the imported
> The `name curios:edge` is the tag you give the imported
> (raw) archive which you can then reference in your container image
> configuration: `set image curios:edge`.
@@ -221,10 +235,13 @@ archive, which helps greatly with container upgrades (see below):
Upgrading a Container Image
---------------------------
<img align="right" src="img/shield-checkmark.svg" alt="Hello World" width=100>
> **Note:** the default writable layer is lost when upgrading the image
> Use named volumes for directories with writable content you wish to
> keep over an upgrade.
The applications in your container are an active part of the system as a
whole, so make it a routine to keep your container images up-to-date!
> **Note:** the default writable layer is lost when upgrading the image.
> Use named volumes for content that you want to persist across upgrades.
All container configurations are locked to the image hash at the time of
first download, not just ones that use an `:edge` or `:latest` tag. An
@@ -300,14 +317,19 @@ Currently two types of of container networks are supported:
> For more information on VETH pairs, see the [Networking Guide][0].
### Container Bridge
A container bridge is what most container setups use and users want.
![IP Masquerading Container Bridge](img/cni-bridge-firewall.svg)
The difference from a regular bridge is that the container runtime fully
manages them -- connecting containers automatically with VETH pairs and
setting up firewall rules between the host and other containers, as well
as managing port forwarding. This transparent background management is
what makes container use seem to be so simple.
manages them -- connecting containers with automatically created VETH
pairs (look at the bridge port names) and setting up firewall rules
between the host and other containers, as well as managing port
forwarding. This transparent background management is what makes
container use seem to be so simple.
All interface configuration is done in configure context.
@@ -326,7 +348,7 @@ have to set manually:
admin@example:/config/interface/docker0/> set container-network type bridge
> **Note:** when doing the same operation over NETCONF there is no
> inference, so all the "magic" settings needs to be defined. This
> inference, so all the "magic" settings need to be defined. This
> makes the CLI very useful for first setup and then extracting the
> resulting XML from the shell using the `cfg -X` command.
@@ -395,20 +417,21 @@ namespace of a container[^3]. This of course works with plain Ethernet
interfaces as well, but here we will use one end of a VETH pair as an
example.
The network `option` setting is available also for this case, but only
the `interface_name=foo0` option works. Which is still very useful. To
change the MAC address, you need to use the `custom-phys-address` in the
general network settings.
[^3]: Something which the container bridge network type does behind the
scenes with one end of an automatically created VETH pair.
#### Routed Setup
In this routed setup we reserve 192.168.0.0/24 for the network between
the host and the `ntpd` container.
_____________
| |
veth0 .1 | .2 eth0 |
\ 192.168.0.0/24 | / |
'--------------------' [ntpd] |
|_____________|
![Basic VETH pair connecting ntpd container.](img/cni-ntpd-routed.svg)
Configuration is a straight-forward VETH pair setup where we name the
container-end of pair `ntpd`. This is just a convenience for us when
@@ -421,7 +444,7 @@ line where we declare the `ntpd` end as a container network interface:
admin@example:/config/interface/veth0/> end
admin@example:/config/> edit interface ntpd
admin@example:/config/interface/ntpd/> set ipv4 address 192.168.0.2 prefix-length 24
admin@example:/config/interface/ntpd/> set phys-address 00:c0:ff:ee:00:01
admin@example:/config/interface/ntpd/> set custom-phys-address static 00:c0:ff:ee:00:01
admin@example:/config/interface/ntpd/> set container-network
> Notice how you can also set a custom MAC address at the same time.
@@ -430,9 +453,12 @@ Adding the interface to the container is the same as before, but since
everything for host interfaces is set up in the interfaces context, we
can take a bit of a shortcut.
admin@example:/config/container/ntpd/> set network ntpd
admin@example:/config/container/ntpd/> set network interface ntpd
admin@example:/config/container/ntpd/> leave
> Use the `set network interface ntpd option interface_name=foo0` to set
> the name of the interface inside the container to `foo0`.
The point of the routed case is that port forwarding from the container
in this case is limited to a single interface, not *all interfaces* as
is the default in the masquerading container bridge setup.
@@ -444,21 +470,15 @@ A perhaps more common case is to bridge the other end of the VETH pair
with other physical ports. In this section we show how to add a new
pair to give our container two interfaces:
_______________
| | .1 br0
veth0 .1 | .2 eth0 | / \
\ 192.168.0.0/24 | / eth1 .2 | veth1b e1
'------------------' \ | 192.168.1.0/24 /
| [ntpd] '------------------'
|_______________|
![Bridged setup with ntpd container.](img/cni-ntpd-bridged.svg)
We start by adding the second VETH pair:
admin@example:/config/> edit interface veth1a
admin@example:/config/interface/veth1a/> set veth peer veth1b
admin@example:/config/interface/veth1a/> set veth peer veth1
admin@example:/config/interface/veth1a/> set ipv4 address 192.168.1.2 prefix-length 24
> The LAN bridge (br0) in this example has IP address 192.168.1.1.
> The LAN bridge (br1) in this example has IP address 192.168.1.1.
When a container has multiple host interfaces it can often be useful to
have a default route installed. This can be added from the host with a
@@ -474,15 +494,16 @@ have a default route installed. This can be added from the host with a
}
}
veth {
peer veth1b;
peer veth1;
}
admin@example:/config/interface/veth1a/> end
admin@example:/config/> set interface veth1b bridge-port bridge br0
admin@example:/config/> set interface veth1 bridge-port bridge br1
Please note, container network routes require the base interface also
have a static IP address set. Setting only the route, but no address,
means the route is skipped.
### Host Networking
The third use-case is host networking, this is where a container share
@@ -492,7 +513,7 @@ the host operating system.
The host networking setup cannot be combined with any other network.
For an example, see below.
For an example, [see below](#application-container-nftables).
Mounts and Volumes
@@ -600,6 +621,17 @@ container ID (hash) is used, but this can be easily changed:
admin@example:/> container shell system
root@sys101:/#
In fact, the container `hostname` setting supports the same format
specifiers as the host's `hostname` setting:
- `%i`: OS ID, from `/etc/os-release`, from Menuconfig branding
- `%h`: Default hostname, from `/etc/os-release`, from branding
- `%m`: NIC specific part of base MAC, e.g., to `c0-ff-ee`
- `%%`: Literal %
The most useful combination is probably `"container-name-%m"`, which in
this example give the container hostname `container-name-c0-ff-ee`.
[^1]: this does not apply to the admin-exec command `container run`.
This command is intended to be used for testing and evaluating
container images. Such containers are given a private network
@@ -627,6 +659,7 @@ Notice how we `set network host`, so the container can see and act on
all the host's interfaces, and that we also have to run the container
in *privileged* mode.
### Application Container: ntpd
The default NTP server/client in Infix is Chrony, a fully working and
@@ -707,7 +740,7 @@ and then asking what the hostname is on the host:
One use-case for this method is when extending Infix with a management
container that connects to other systems. For some tips on how to
control an Infix system this way, see [Scripting Infix](scriptiong.md).
control an Infix system this way, see [Scripting Infix](scripting.md).
[^2]: The `nsenter` program is available from either the util-linux
package in Debian/Ubuntu/Mint, or in BusyBox. Note, however,
@@ -715,7 +748,7 @@ control an Infix system this way, see [Scripting Infix](scriptiong.md).
[0]: networking.md
[1]: https://github.com/kernelkit/infix/blob/main/src/confd/yang/infix-containers%402023-12-14.yang
[1]: https://github.com/kernelkit/infix/blob/main/src/confd/yang/infix-containers.yang
[2]: https://github.com/troglobit/mg
[3]: https://github.com/opencontainers/image-spec/blob/main/image-layout.md
[4]: system.md#ssh-authorized-key
+60 -22
View File
@@ -67,14 +67,7 @@ $ sudo apt install bc binutils build-essential bzip2 cpio \
diffutils file findutils git gzip \
libncurses-dev libssl-dev perl patch \
python3 rsync sed tar unzip wget \
autopoint bison flex
```
For testing, a few more tools and services are required on your system:
```bash
$ sudo apt install jq graphviz qemu-system-x86 qemu-system-arm \
ethtool gdb-multiarch tcpdump tshark
autopoint bison flex autoconf automake
```
> For details, see the Getting Started and System Requirements sections
@@ -94,6 +87,23 @@ To see available defconfigs for supported targets, use:
make list-defconfigs
### Test
Working with the regression test framework, *Infamy*, a few more tools
and services are required on your system:
```bash
$ sudo apt install jq graphviz qemu-system-x86 qemu-system-arm \
ethtool gdb-multiarch tcpdump tshark
```
To be able to build the test specification you also need:
```bash
$ sudo apt-get install python3-graphviz ruby-asciidoctor-pdf
```
Development
-----------
@@ -166,23 +176,48 @@ The Infix automated test suite is built around Qemu and [Qeneth][2], see:
* [Docker Image](../test/docker/README.md)
Reviewing
---------
While reviewing a pull request, you might find yourself wanting to
play around with a VM running that _exact_ version. For such
occations, [gh-dl-artifact.sh](../utils/gh-dl-artifact.sh) is your
friend in need! It will use the [GitHub CLI
(gh)](https://cli.github.com) to locate a prebuilt image from our CI
workflow, download it, and prepare a local output directory from which
you can launch both `make run` instances, and run regression tests
with `make test` and friends.
For example, if you are curious about how PR 666 behaves in some
particular situation, you can use `gh` to switch to that branch, from
which `gh-dl-artifact.sh` can then download and prepare the
corresponding image for execution with our normal tooling:
gh pr checkout 666
./utils/gh-dl-artifact.sh
cd x-artifact-a1b2c3d4-x86_64
make run
> **Note:** CI artifacts are built from a merge commit of the source
> and target branches. Therefore, the version in the Infix banner
> will not match the SHA of the commit you have checked out.
Contributing
------------
Infix is built from many parts, when contributing you need to set up
your own fork, create a local branch for your change, push to your fork,
and then use GitHub to create a *Pull Reqeuest*.
Infix is built from many components, when contributing you need to set
up your own fork, create a local branch for your change, push to your
fork, and then use GitHub to create a *Pull Reqeuest*.
For this to work as painlessly as possible:
For this to work as *painlessly as possible* for everyone involved:
1. Fork Infix to your own user or organization[^1]
2. Fork all the Infix submodules, e.g., `kernelkit/buildroot` to your
own user or organization as well
3. Clone your fork of Infix to your laptop/workstation
If you use a GitHub organization you get the added benefit of having
local peer reviews of changes before making a pull request to the
upstream Infix repository.
1. Fork Infix to your own user or organization[^1]
2. Fork all the Infix submodules, e.g., `kernelkit/buildroot` to your
own user or organization as well
3. Clone your fork of Infix to your laptop/workstation
4. [Deactivate the Actions][6] you don't want in your fork
5. Please read the [Contributing Guidelines][5] as well!
```bash
$ cd ~/Projects
@@ -190,10 +225,10 @@ $ git clone https://github.com/YOUR_USER_NAME/infix.git
$ cd infix/
$ git submodule update --init
```
> **Note:** when updating/synchronizing with upstream Infix changes you
> may have to synchronize your forks as well. GitHub have a `Sync fork`
> button in the GUI for your fork for this purpose.
> button in the GUI for your fork for this purpose. A cronjob on your
> server of choice can do this for you with the [GitHub CLI tool][7].
[^1]: Organizations should make sure to lock the `main` (or `master`)
branch of their clones to ensure members do not accidentally merge
@@ -206,3 +241,6 @@ $ git submodule update --init
[2]: https://github.com/wkz/qeneth
[3]: https://netopeer.liberouter.org/doc/sysrepo/master/html/dev_guide.html
[4]: https://buildroot.org/downloads/manual/manual.html#_developer_guide
[5]: https://github.com/kernelkit/infix/blob/main/.github/CONTRIBUTING.md
[6]: https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/disabling-and-enabling-a-workflow
[7]: https://cli.github.com/
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 317 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 340 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 269 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 339 KiB

+1 -1
View File
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 268 KiB

After

Width:  |  Height:  |  Size: 281 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 262 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 464 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 388 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 343 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 224 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 269 KiB

+19 -11
View File
@@ -15,7 +15,8 @@ managing entire fleets of installed equipment.
Nevertheless, when it comes to initial deployment and debugging, it
is very useful to know how to navigate and use the CLI.
> Proceed to the [CLI User Guide](cli/tutorial.md).
> Proceed to the [CLI Introduction](cli/introduction.md) or [CLI
> Configuration Tutorial](cli/configure.md).
## Key Concepts
@@ -62,9 +63,11 @@ The system has several datastores (or files):
configure context. Any changes made here can be discarded (`abort`,
`rollback`) or committed (`commit`, `leave`) to `running-config`.
> See the [Branding & Releases](branding.md) for information on how
> `factory-config` and `failure-config` can be adapted to different
> customer requirements.
> Please see the [Branding & Releases](branding.md) document for more
> in-depth information on how `factory-config` and `failure-config` can
> be adapted to different customer requirements. Including how you can
> override the generated versions of these files with plain per-product
> ones -- this may even protect against some of the failure modes below.
## System Boot
@@ -90,7 +93,8 @@ password in VPD, are detailed later in this section.
there is a working fail safe, or rather *fail secure*, mode
4. On first power-on, and after a factory reset, the system does not
have a `startup-config`, in which case `factory-config` is copied
to `startup-config`
to `startup-config` -- if a per-product specific version exists it
is preferred over the generated one
5. Provided the integrity of the `startup-config` is OK, a system
service loads and activates the configuration
@@ -123,13 +127,17 @@ syntax, failed validation against the system's YANG model, or a bug in
the system's `confd` service, the *Fail Secure Mode* is triggered and
`failure-config` is loaded (unless VPD Failure, see above).
> Again, please see the [Branding & Releases](branding.md) document for
> how to provide a per-product hard-coded `failure-config` to suit your
> products preferences.
*Fail Secure Mode* is a fail-safe mode provided for debugging the
system. The default[^3] is isolated interfaces with communication only to
the management CPU, SSH and console login using the device's factory
reset password, IP connectivity only using IPv6 link-local, and device
discovery protocols: LLDP, mDNS-SD. The login and shell prompt are set
to `failure-c0-ff-ee`, the last three octets of the device's base MAC
address.
system. The default[^3] creates a setup of isolated interfaces with
communication only to the management CPU, SSH and console login using
the device's factory reset password, IP connectivity only using IPv6
link-local, and device discovery protocols: LLDP, mDNS-SD. The login
and shell prompt are set to `failure-c0-ff-ee`, the last three octets of
the device's base MAC address.
[^1]: YANG is a modeling language from IETF, replacing that used for
SNMP (MIB), used to describe the subsystems and properties of
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

+295 -57
View File
@@ -14,18 +14,47 @@ Infix to exploit the unique features not available in IEEE models.
## Interface LEGO®
The network building blocks available in Linux are akin to the popular
LEGO® bricks.
![Linux Networking Blocks](img/lego.svg)
There are two types of relationships that can link two blocks together:
1. **Lower-to-upper**: Visually represented by an extruding square
connected upwards to a square socket. An interface _can only have
a single_ lower-to-upper relationship, i.e., it can be attached to
a single upper interface like a bridge or a LAG. In `iproute2`
parlance, this corresponds to the interface's `master` setting
2. **Upper-to-lower**: Visually represented by an extruding semicircle
connected downwards to a semicircle socket. The lower interface in
these relationships _accepts multiple_ upper-to-lower relationships
from different upper blocks. E.g., multiple VLANs and IP address
blocks can be connected to the same lower interface
![Stacking order dependencies](img/lego-relations.svg)
An interface may simultaneously have a _lower-to-upper_ relation to some
other interface, and be the target of one or more _upper-to-lower_
relationships. It is valid, for example, for a physical port to be
attached to a bridge, but also have a VLAN interface stacked on top of
it. In this example, traffic assigned to the VLAN in question would be
diverted to the VLAN interface before entering the bridge, while all
other traffic would be bridged as usual.
| **Type** | **Yang Model** | **Description** |
| -------- | ----------------- | ------------------------------------------------------------- |
|----------|----------------------------|---------------------------------------------------------------|
| bridge | infix-if-bridge | SW implementation of an IEEE 802.1Q bridge |
| ip | ietf-ip, infix-ip | IP address to the subordinate interface |
| vlan | infix-if-vlan | Capture all traffic belonging to a specific 802.1Q VID |
| lag[^1] | infix-if-lag | Bonds multiple interfaces into one, creating a link aggregate |
| lo | ietf-interfaces | Software loopback interface |
| eth | ietf-interfaces, | Physical Ethernet device/port |
| | ieee802-ethernet-interface | |
| eth | ieee802-ethernet-interface | Physical Ethernet device/port. |
| | infix-ethernet-interface | |
| veth | infix-if-veth | Virtual Ethernet pair, typically one end is in a container |
| *common* | ietf-interfaces, | Properties common to all interface types |
| | infix-interfaces | |
## Data Plane
@@ -50,6 +79,69 @@ possible to share with a container. Meaning, all the building blocks
used on the left hand side can also be used freely on the right hand
side as well.
### General
General interface settings include `type`, `enable`, custom MAC address,
and text `description`. Other settings have their own sections, below.
The `type` is important to set when configuring devices remotely because
unlike the CLI, a NETCONF or RESTCONF session cannot guess the interface
type for you. The operating system provides an override of the
available interface types.
An `enabled` interface can be inspected using the operational datastore,
nodes `admin-state` and `oper-state` show the status, . Possible values
are listed in the YANG model.
The `custom-phys-address` can be used to set an interface's MAC address.
This is an extension to the ietf-interfaces YANG model, which defines
`phys-address` as read-only[^4]. The following shows the different
configuration options.
The `description` is saved as Linux `ifalias` on an interface. It is a
free-form string, useful for describing purpose or just adding comments
for remote debugging, e.g., using the operational datastore.
> **Note:** there is no validation or safety checks performed by the
> system when using `custom-phys-address`. In particular the `offset`
> variant can be dangerous to use -- pay attention to the meaning of
> bits in the upper-most octet: local bit, multicast/group, etc.
#### Fixed custom MAC
```
admin@example:/config/> edit interface veth0a
admin@example:/config/interface/veth0a/> set custom-phys-address static 00:ab:00:11:22:33
=> 00:ab:00:11:22:33
```
#### Chassis MAC
Chassis MAC, sometimes also referred to as base MAC. In these two
examples it is `00:53:00:c0:ff:ee`.
```
admin@example:/config/> edit interface veth0a
admin@example:/config/interface/veth0a/> set custom-phys-address chassis
=> 00:53:00:c0:ff:ee
```
#### Chassis MAC, with offset
When constructing a derived address it is recommended to set the locally
administered bit. Same chassis MAC as before.
```
admin@example:/config/> edit interface veth0a
admin@example:/config/interface/veth0a/> set custom-phys-address chassis offset 02:00:00:00:00:02
=> 02:53:00:c0:ff:f0
```
### Bridging
This is the most central part of the system. A bridge is a switch, and
@@ -57,6 +149,8 @@ a switch is a bridge. In Linux, setting up a bridge with ports
connected to physical switch fabric, means you manage the actual switch
fabric!
#### MAC Bridge
In Infix ports are by default not switch ports, unless the customer
specific factory config sets it up this way. To enable switching
between ports you create a bridge and then add ports to that
@@ -79,6 +173,13 @@ Here we add two ports to bridge `br0`: `eth0` and `eth1`.
> Other "magic" names are `ethN.M` for VLAN M on top of `ethN`, or
> `dockerN` to create an IP masquerading container bridge.
![A MAC bridge with two ports](img/mac-bridge.svg)
It is possible to create multiple MAC bridges, however, it is
currently[^5] _not recommended_ to use more than one MAC bridge on
products with Marvell LinkStreet switching ASICs. A VLAN filtering
bridge should be used instead.
#### VLAN Filtering Bridge
By default bridges in Linux do not filter based on VLAN tags. It can be
@@ -92,7 +193,7 @@ admin@example:/config/> edit interface br0
admin@example:/config/interface/br0/> up
admin@example:/config/> set interface eth0 bridge-port bridge br0
admin@example:/config/> set interface eth0 bridge-port pvid 10
admin@example:/config interface eth1 bridge-port bridge br0
admin@example:/config/> set interface eth1 bridge-port bridge br0
admin@example:/config/> set interface eth1 bridge-port pvid 20
admin@example:/config/> edit interface br0
admin@example:/config/interface/br0/> set bridge vlans vlan 10 untagged eth0
@@ -103,6 +204,8 @@ This sets `eth0` as an untagged member of VLAN 10 and `eth1` as an
untagged member of VLAN 20. Switching between these ports is thus
prohibited.
![A VLAN bridge with two VLANs](img/vlan-bridge.svg)
To terminate a VLAN in the switch itself, either for switch management
or for routing, the bridge must become a (tagged) member of the VLAN.
@@ -115,6 +218,7 @@ admin@example:/config/interface/br0/> set bridge vlans vlan 20 tagged br0
> on top of the bridge, see section [VLAN Interfaces](#vlan-interfaces)
> below for more on this topic.
#### Multicast Filtering and Snooping
Multicast filtering in the bridge is handled by the bridge itself. It
@@ -329,7 +433,7 @@ top of a bridge interface *br0* is named *vlan10*.
#### Ethernet Settings and Status
Physical Ethernet interfaces provide low-level settings for speed/duplex as
well as packet status and statistics (*ieee802-ethernet-interface.yang*).
well as packet status and [statistics](#ethernet-statistics).
By default, Ethernet interfaces defaults to auto-negotiating
speed/duplex modes, advertising all speed and duplex modes available.
@@ -411,7 +515,7 @@ require auto-negotiation to be enabled.
#### Ethernet statistics
Ethernet packet statistics can be listed as shown below.
Ethernet packet statistics[^6] can be listed as shown below.
```
admin@example:/> show interfaces name eth1
@@ -499,6 +603,9 @@ Multiple address assignment methods are available:
| link-local | infix-ip | Auto-assignment of IPv4 address in 169.254.x.x/16 range |
| dhcp | infix-dhcp-client | Assignment of IPv4 address by DHCP server, e.g., *10.0.1.1/24* |
> **Note:** DHCP address method is only available for *LAN* interfaces
> (Ethernet, virtual Ethernet (veth), bridge, link aggregates, etc.)
Supported DHCP (request) options, configurability (Cfg) and defaults,
are listed below. Configurable options can be disabled on a per client
interface basis, some options, like `clientid` and option 81, are
@@ -524,8 +631,16 @@ possible to set the value of as well.
**Default:** `router`, `dns`, `domain`, `broadcast`, `ntpsrv`, `search`,
`address`, `staticroutes`, `msstaticroutes`
> **Note:** DHCP address method is only available for *LAN* interfaces
> (Ethernet, virtual Ethernet (veth), bridge, link aggregates, etc.)
When configuring a DHCP client, ensure that the NTP client is enabled
for the `ntpsrv` DHCP option to be processed correctly. If the NTP
client is not enabled, any NTP servers provided by the DHCP server will
be ignored. For details on how to enable the NTP client, see the
[NTP Client Configuration](system.md#ntp-client-configuration) section.
> **Note:** as per [RFC3442][4], if the DHCP server returns both a
> Classless Static Routes option (121) and Router option (3), the
> DHCP client *must* ignore the latter.
### IPv6 Address Assignment
@@ -598,6 +713,13 @@ As shown, the link-local IPv4 address is configured with `set autconf
enabled true`. The resulting address (169.254.1.3/16) is of type
*random* ([ietf-ip.yang][2]).
The IPv4LL client also supports a `request-address` setting which can be
used to "seed" the client's starting address. If the address is free it
will be used, otherwise it falls back to the default algorithm.
admin@example:/config/interface/eth0/ipv4/> set autoconf request-address 169.254.1.2
#### Use of DHCP for IPv4 address assignment
![Using DHCP for IPv4 address assignment](img/ip-address-example-ipv4-dhcp.svg)
@@ -657,6 +779,7 @@ admin@example:/>
ipv6 ::1/128 (static)
admin@example:/>
#### Stateless Auto-configuration of Global IPv6 Address
![Auto-configuration of global IPv6](img/ip-address-example-ipv6-auto-global.svg)
@@ -693,6 +816,7 @@ below.
ipv6 ::1/128 (static)
admin@example:/>
#### Random Link Identifiers for IPv6 Stateless Autoconfiguration
![Auto-configuration of global IPv6](img/ip-address-example-ipv6-auto-global.svg)
@@ -731,9 +855,11 @@ possible to specify use of a random identifier ([ietf-ip.yang][2] and
Both the link-local address (fe80::) and the global address (2001:)
have changed type to *random*.
### IPv4 forwarding
To be able to route (static or dynamic) on the interface it is
required to enable forwarding. This setting controlls if packets
required to enable forwarding. This setting controls if packets
received on this interface can be forwarded.
```
admin@example:/config/> edit interface eth0
@@ -742,17 +868,19 @@ received on this interface can be forwarded.
admin@example:/>
```
### IPv6 forwarding
This flag behaves totally different than for IPv4. For IPv6 the
ability to route between interfaces is always enabled, instead this
flag controls if the interface will be in host/router mode.
| **Feature** | **Forward enabled** | **Forward disabled** |
|:------------------------------------------|:--------------------|:---------------------|
| IsRouter set in Neighbour Advertisements. | Yes | No |
| Transmit Router Solicitations. | No | Yes |
| Router Advertisements are ignored | No | Yes |
| Accept Redirects | No | Yes |
| **Feature** | **Forward enabled** | **Forward disabled** |
|:-----------------------------------------|:--------------------|:---------------------|
| IsRouter set in Neighbour Advertisements | Yes | No |
| Transmit Router Solicitations | No | Yes |
| Router Advertisements are ignored | No | Yes |
| Accept Redirects | No | Yes |
```
admin@example:/config/> edit interface eth0
@@ -760,18 +888,36 @@ flag controls if the interface will be in host/router mode.
admin@example:/config/interface/eth0/> leave
admin@example:/>
```
## Routing support
| **Yang Model** | **Description** |
|:--------------------------|:--------------------------------------------------------------------------------------|
| ietf-routing | Base model, used to set configuration and read operational status in the other models |
| ietf-ipv4-unicast-routing | Static IPv4 unicast routing |
| ietf-ipv6-unicast-routing | Static IPv6 unicast routing |
| ietf-ospf | OSPF routing |
| infix-routing | Infix deviations |
Currently supported YANG models:
| **YANG Model** | **Description** |
|:--------------------------|:--------------------------------|
| ietf-routing | Base model for all other models |
| ietf-ipv4-unicast-routing | Static IPv4 unicast routing |
| ietf-ipv6-unicast-routing | Static IPv6 unicast routing |
| ietf-ospf | OSPF routing |
| infix-routing | Infix deviations and extensions |
The base model, ietf-routing, is where all the other models hook in. It
is used to set configuration and read operational status (RIB tables) in
the other models.
> **Note:** the standard IETF routing models allows multiple instances,
> but Infix currently *only support one instance* per routing protocol!
> In the examples presented here, the instance name `default` is used.
### IPv4 Static routes
Remember to enable [IPv4 forwarding](#IPv4-forwarding) for the interfaces.
The standard IETF model for static routes reside under the `static`
control plane protocol. For our examples we use the instance name
`default`, you can use any name.
For a route with destination 192.168.200.0/24 via 192.168.1.1:
admin@example:/> configure
admin@example:/config/> edit routing control-plane-protocol static name default
@@ -779,7 +925,18 @@ Remember to enable [IPv4 forwarding](#IPv4-forwarding) for the interfaces.
admin@example:/config/routing/control-plane-protocol/static/name/default/> leave
admin@example:/>
> **Note:** You can only have one instance per routing protocol.
For a "floating" static route with destination 10.0.0.0/16 via a backup
router 192.168.1.1, using the highest possible distance:
admin@example:/> configure
admin@example:/config/> edit routing control-plane-protocol static name default
admin@example:/config/routing/control-plane-protocol/static/name/default/> set ipv4 route 10.0.0.0/16 next-hop next-hop-address 192.168.1.1 route-preference 254
admin@example:/config/routing/control-plane-protocol/static/name/default/> leave
admin@example:/>
> Remember to enable [IPv4 forwarding](#IPv4-forwarding) for the
> interfaces you want to route between.
### IPv6 Static routes
@@ -789,24 +946,25 @@ Remember to enable [IPv4 forwarding](#IPv4-forwarding) for the interfaces.
admin@example:/config/routing/control-plane-protocol/static/name/default/> leave
admin@example:/>
> **Note:** You can only have one instance per routing protocol.
### OSPFv2 Routing
Infix supports OSPF dynamic routing for IPv4, i.e., OSPFv2.
Remember to enable [IPv4 forwarding](#IPv4-forwarding) for the
interfaces you want to run OSPFv2.
The system supports OSPF dynamic routing for IPv4, i.e., OSPFv2. To
enable OSPF and set one active interface in area 0:
admin@example:/config/> edit routing control-plane-protocol ospfv2 name default
admin@example:/config/routing/control-plane-protocol/ospfv2/name/default/> set ospf area 0.0.0.0 interface e0 enabled true
admin@example:/config/routing/control-plane-protocol/ospfv2/name/default/> set ospf area 0.0.0.0 interface e0 enabled
admin@example:/config/routing/control-plane-protocol/ospfv2/name/default/> leave
admin@example:/>
> **Note:** You can only have one instance per routing protocol.
> Remember to enable [IPv4 forwarding](#IPv4-forwarding) for all the
> interfaces you want to route between.
#### OSPF area types
In addition to *regular* OSPF areas, area types *NSSA* and *Stub* are supported.
To configure a NSSA area with summary routes:
In addition to *regular* OSPF areas, area types *NSSA* and *Stub* are
also supported. To configure an NSSA area with summary routes:
admin@example:/config/> edit routing control-plane-protocol ospfv2 name default
admin@example:/config/routing/control-plane-protocol/ospfv2/name/default/> set ospf area 0.0.0.1 area-type nssa-area
@@ -814,8 +972,10 @@ To configure a NSSA area with summary routes:
admin@example:/config/routing/control-plane-protocol/ospfv2/name/default/> leave
admin@example:/>
#### Bidirectional Forwarding Detection (BFD)
It is possible to enable BFD per interface to speed up detection of
It is possible to enable BFD per OSPF interface to speed up detection of
link loss.
admin@example:/config/> edit routing control-plane-protocol ospfv2 name default
@@ -823,12 +983,13 @@ link loss.
admin@example:/config/routing/control-plane-protocol/ospfv2/name/default/> leave
admin@example:/>
#### OSPF interface settings
We have already seen how to enable OSPF per interface (*enabled true*)
and BFD for OSPF per interface (*bfd enabled true*). These and other
OSPF interface settings are done in context of an OSFP area, e.g.,
*area 0.0.0.0*. Available commands can be listed using the `?` mark.
and BFD for OSPF per interface (*bfd enabled true*). These and other
OSPF interface settings are done in context of an OSFP area, e.g., *area
0.0.0.0*. Available commands can be listed using the `?` mark.
admin@example:/config/routing/control-plane-protocol/ospfv2/name/default/> edit ospf area 0.0.0.0
admin@example:/config/routing/control-plane-protocol/ospfv2/name/default/ospf/area/0.0.0.0/> edit interface e0
@@ -870,47 +1031,113 @@ routes`.
### View routing table
The routing table can be viewed from the operational datastore over
NETCONF or using the CLI:
The routing table can be inspected from the operational datastore, XPath
`/routing/ribs`, using sysrepocfg, NETCONF/RESTCONF, or using the CLI.
#### IPv4 routing table
admin@example:/> show routes ipv4
PREFIX NEXT-HOP PREF PROTOCOL
192.168.1.0/24 e0 kernel
192.168.200.0/24 192.168.1.1 20 static
This CLI example shows the IPv4 routing table with a few connected
routes and some routes learned from OSPF. See the next section for
an explanation of route preferences (PREF).
The `>` at the start of a line marks a selected route (in the IETF YANG
model referred to as *active*), if there are more than one route with
the same destination the `*` marks the next-hop used and installed in
the kernel FIB (the YANG model refers to this as *installed*).
admin@example:/> show ip route
DESTINATION PREF NEXT-HOP PROTO UPTIME
>* 0.0.0.0/0 110/2 10.0.23.1 ospfv2 4h2m43s
>* 10.0.0.1/32 110/4000 10.0.13.1 ospfv2 4h2m43s
10.0.0.3/32 110/0 lo ospfv2 4h2m57s
>* 10.0.0.3/32 0/0 lo direct 4h2m58s
10.0.13.0/30 110/2000 e5 ospfv2 4h2m57s
>* 10.0.13.0/30 0/0 e5 direct 4h2m58s
10.0.23.0/30 110/1 e6 ospfv2 4h2m57s
>* 10.0.23.0/30 0/0 e6 direct 4h2m58s
192.168.3.0/24 110/1 e2 ospfv2 4h2m57s
>* 192.168.3.0/24 0/0 e2 direct 4h2m58s
admin@example:/>
#### IPv6 routing table
admin@example:/> show routes ipv6
PREFIX NEXT-HOP PREF PROTOCOL
2001:db8:3c4d:50::/64 eth4 256 kernel
fe80::/64 eth5 256 kernel
fe80::/64 eth3 256 kernel
fe80::/64 eth1 256 kernel
fe80::/64 eth0 256 kernel
fe80::/64 eth2 256 kernel
fe80::/64 eth4 256 kernel
This CLI example show the IPv6 routing table.
admin@example:/> show ipv6 route
DESTINATION PREF NEXT-HOP PROTO UPTIME
>* ::/0 1/0 2001:db8:3c4d:50::1 static 0h1m20s
>* 2001:db8:3c4d:50::/64 0/0 e6 direct 0h1m20s
>* 2001:db8:3c4d:200::1/128 0/0 lo direct 0h1m20s
* fe80::/64 0/0 e7 direct 0h1m20s
* fe80::/64 0/0 e6 direct 0h1m20s
* fe80::/64 0/0 e5 direct 0h1m20s
* fe80::/64 0/0 e4 direct 0h1m20s
* fe80::/64 0/0 e3 direct 0h1m20s
* fe80::/64 0/0 e2 direct 0h1m20s
>* fe80::/64 0/0 e1 direct 0h1m20s
admin@example:/>
#### Route Preference
The operating system leverages FRRouting ([Frr][0]) as routing engine
for both static and dynamic routing. Even routes injected from a DHCP
client, and IPv4 link-local (IPv4) routes, are injected into Frr to let
it weigh all routes before installing them into the kernel routing table
(sometimes referred to as FIB).
Routes have different weights made up from a *distance* and a *metric*.
The kernel routing table only talks about *metric*, which unfortunately
is **not the same** -- this is one of the reasons why the term *route
preference* is used instead. It is recommended to use the CLI, or any
of the other previously mentioned YANG based front-ends, to inspect the
routing table.
Default distances used (lower numeric value wins):
| **Distance** | **Protocol** |
|--------------|-----------------------------------------|
| 0 | Kernel routes, i.e., connected routes |
| 1 | Static routes |
| 5 | DHCP routes |
| 110 | OSPF |
| 254 | IPv4LL (ZeroConf) device routes |
| 255 | Route will not be used or redistributed |
Hence, a route learned from OSPF may be overridden by a static route set
locally. By default, even a route to the same destination, but with a
different next-hop, learned from a DHCP server wins over an OSPF route.
The distance used for static routes and DHCP routes can be changed by
setting a different *routing preference* value.
> **Note:** the kernel metric is an unsigned 32-bit value, which is read
> by Frr as (upper) 8 bits distance and 24 bits metric. But it does not
> write it back to the kernel FIB this way, only selected routes are
> candidates to be installed in the FIB by Frr.
#### Source protocol
The source protocol describes the origin of the route.
| **Protocol** | **Description** |
|:-------------|:---------------------------------------------------------------------|
| kernel | Added when setting a subnet address on an interface |
| static | User created static routes |
| dhcp | Routes retrieved from DHCP |
| ospf | Routes retreived from OSPFv2 |
| **Protocol** | **Description** |
|:-------------|:----------------------------------------------------|
| kernel | Added when setting a subnet address on an interface |
| static | User created, learned from DHCP, or IPv4LL |
| ospfv2 | Routes learned from OSPFv2 |
The YANG model *ietf-routing* support multiple ribs but only two are
currently supported, namely `ipv4` and `ipv6`.
[1]: https://www.rfc-editor.org/rfc/rfc8343
[2]: https://www.rfc-editor.org/rfc/rfc8344
[3]: https://www.rfc-editor.org/rfc/rfc8981
[4]: https://www.rfc-editor.org/rfc/rfc3442
[0]: https://frrouting.org/
[^1]: Please note, link aggregates are not yet supported in Infix.
[^2]: Link-local IPv6 addresses are implicitly enabled when enabling
@@ -920,3 +1147,14 @@ currently supported, namely `ipv4` and `ipv6`.
mapping the low-order 23-bits of the IP address in the low-order 23
bits of the Ethernet address 01:00:5E:00:00:00. Meaning, more than
one IP multicast group maps to the same MAC multicast group.
[^4]: A YANG deviation was previously used to make it possible to set
`phys-address`, but this has been replaced with the more flexible
`custom-phys-address`.
[^5]: Infix MAC bridges on Marvell Linkstreet devices are currently
limited to use a single MAC database, causing issues if the same
MAC address appears on different MAC bridges.
[^6]: Ethernet counters are described in
*ieee802-ethernet-interface.yang* and
*infix-ethernet-interface.yang*. [Ethernet
Counters](eth-counters.md) page provides additional details on
statistics support.
+45 -10
View File
@@ -12,14 +12,6 @@ packets to drop and which ones to prioritize, such that critical
services remain operational.
## Software Forwarded Traffic
For packets which are processed by a CPU, i.e. typically routed
traffic, and bridged traffic between interfaces that do not belong to
the same hardware switching domain, an [nftables container][1] can be
used to define a QoS policy.
## Hardware Forwarded Traffic
The default QoS policy for flows which are offloaded to a switching
@@ -34,6 +26,14 @@ chips in this family where limited to 4 output queues per port, this
documentation is _only_ valid for newer generations with 8 output
queues per port.
![Hardware offloading for Marvell Link Street](img/qos-hw-mvls.svg)
The picture illustrates packets having their priority determined at
ingress, here interface _e1_ and _e3_. In this example, both packets
are forwarded to the same outgoing interface (_e2_), subject to output
queueing. The sections below provides more information on these
topics.
#### Default Policy
##### Queueing
@@ -54,8 +54,8 @@ significant bits of the DSCP is used to select the queue:
| 6 | 48-55 | ⇒ | 6 | 25 |
| 7 | 56-63 | ⇒ | 7 | 33 |
For packets containing both a VLAN tag and an IP header, DSCP priority
takes precedence over PCP priority. In cases where neither are
For packets containing both a VLAN tag and an IP header, PCP priority
takes precedence over DSCP priority. In cases where neither are
available, packets are always assigned to queue 0.
Each port's set of 8 egress queues operate on a Weighted Round Robin
@@ -73,6 +73,41 @@ set to the 3 most significant bits of it. If no priority information
is available in the frame on ingress (i.e. untagged non-IP), then
packets will egress out of tagged ports with PCP set to 0.
## Software Forwarded Traffic
For packets which are processed by a CPU, i.e. typically routed
traffic, and bridged traffic between interfaces that do not belong to
the same hardware switching domain, an [nftables container][1] can be
used to define a QoS policy.
For VLAN interfaces, Infix provides support for mapping the Priority
Code Point (PCP) to internal priority on ingress, and the reverse on
egress.
![Ingress and Egress Priority mapping for VLAN interfaces](img/qos-vlan-iface.svg)
These `ingress-qos` and `egress-qos` settings are done per VLAN, both
defaulting to '0'. The example below shows how to keep the PCP priority
for packets being routed between two VLAN interfaces.
```
admin@example:/config/> edit interface e1.10
admin@example:/config/interface/e1.10/> set vlan ingress-qos priority from-pcp
admin@example:/config/interface/e1.10/> up
admin@example:/config/> edit interface e1.20
admin@example:/config/interface/e1.20/> set vlan egress-qos pcp from-priority
admin@example:/config/interface/e1.20/> leave
admin@example:/>
```
## A complex example
The picture below shows a packet flow being subject both to software
forwarding and hardware offloading.
![Hardware and Software QoS Handling](img/qos-complex.svg)
[1]: container.md#application-container-nftables
[2]: https://en.wikipedia.org/wiki/IEEE_802.1Q
+77 -1
View File
@@ -145,7 +145,7 @@ is committed by issuing the `leave` command.
admin@host:/config/> edit system
admin@host:/config/system/> set hostname example
admin@host:/config/system/> leave
admin@example:/>
admin@host:/>
```
The hostname is advertised over mDNS-SD in the `.local` domain. If
@@ -201,6 +201,82 @@ admin@host:/>
> and then re-enter configure context to use your editor of choice.
## NTP Client Configuration
Below is an example configuration for enabling NTP
with a specific server and the `iburst` option for faster initial
synchronization.
```
admin@host:/> configure
admin@host:/config/> set system ntp enabled
admin@host:/config/> set system ntp server ntp-pool
admin@host:/config/> set system ntp server ntp-pool udp address pool.ntp.org
admin@host:/config/> set system ntp server ntp-pool iburst
admin@host:/config/> set system ntp server ntp-pool prefer
```
This configuration enables the NTP client and sets the NTP server to
`pool.ntp.org` with the `iburst` and `prefer` options. The `iburst`
option ensures faster initial synchronization, and the `prefer` option
designates this server as preferred.
* `prefer false`: The NTP client will choose the best available source
based on several factors, such as network delay, stratum, and other
metrics (default config).
* `prefer true`: The NTP client will try to use the preferred server
as the primary source unless it becomes unreachable or unusable.
### Show NTP Status
To check the status of NTP synchronization, use the following command:
```
admin@host:/> show ntp
Reference ID : C0248F86 (192.36.143.134)
Stratum : 2
Ref time (UTC) : Mon Oct 21 10:06:45 2024
System time : 0.000000001 seconds slow of NTP time
Last offset : -3845.151367188 seconds
RMS offset : 3845.151367188 seconds
Frequency : 4.599 ppm slow
Residual freq : +1293.526 ppm
Skew : 12.403 ppm
Root delay : 1.024467230 seconds
Root dispersion : 0.273462683 seconds
Update interval : 0.0 seconds
Leap status : Normal
admin@host:/>
```
This output provides detailed information about the NTP status, including
reference ID, stratum, time offsets, frequency, and root delay.
### Show NTP Sources
To view the sources being used by the NTP client, run:
```
admin@host:/> show ntp sources
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current best, '+' = combined, '-' = not combined,
| / 'x' = may be in error, '~' = too variable, '?' = unusable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 192.36.143.134 1 6 177 9 +278ms[ -3845s] +/- 514ms
admin@host:/>
```
> The system uses `chronyd` for Network Time Protocol (NTP)
> synchronization. The output shown here is best explained in the
> [Chrony documentation](https://chrony-project.org/doc/4.6.1/chronyc.html).
[1]: https://www.rfc-editor.org/rfc/rfc7317
[2]: https://github.com/kernelkit/infix/blob/main/src/confd/yang/infix-system%402024-02-29.yang
[3]: https://www.rfc-editor.org/rfc/rfc8341
+1 -1
View File
@@ -17,7 +17,7 @@ Tenets
It is also much more practical and economical to build large virtual
networks than physical ones.
- **Avoid CLI scipting & scraping**. Reliably interacting with a DUT
- **Avoid CLI scripting & scraping**. Reliably interacting with a DUT
over a serial line in a robust way is _very_ hard to get right.
Given that we have a proper API (RESTCONF), we should leverage that
when testing. Front-ends can be tested by other means.
+35 -2
View File
@@ -265,7 +265,7 @@ suite:
This is useful because this value can then be used to rerun a test (or
the whole suite) with identical topology mappings:
$ make PYTHONHASHSEED=3773822171 INFIX_TESTS=case/ietf_system/hostname.py test
$ make PYTHONHASHSEED=3773822171 TESTS=case/ietf_system/hostname.py test
### Deterministic Transport Protocol
@@ -274,7 +274,7 @@ chosen randomly. If you supply a `PYTHONHASHSEED` as described above,
you get the same protocol used for that hash. But if you want to choose
the protocol, add extra arguments to Infamy:
$ make INFAMY_EXTRA_ARGS="--transport=restconf" INFIX_TESTS=case/ietf_system/hostname.py test
$ make INFAMY_EXTRA_ARGS="--transport=restconf" TESTS=case/ietf_system/hostname.py test
or, when running interactively:
@@ -282,5 +282,38 @@ or, when running interactively:
09:08:17 infamy0:test # ./9pm/9pm.py -o"--transport=restconf" case/ietf_system/hostname.py
### Test specification
The test specification is automaticly generated from the test cases,
this puts some constraints on the test cases:
All test cases must be written so that it can be understandable with
only the steps so the result can be reproduced manually. E.g., instead
of `set ip address on the interface` it should be more human readable,
for example:
```python
test.step("Set IPv4 address on the interface dut:cross")
test.step("Verify the IP address is set on dut:cross")
```
where dut, cross and the IPv4 address could be found inside the
logical topology for the test.
Each test case must begin with the test name followed by a empty line and
the description of the test. For example:
```
"""
Set hostname
Verify that it it possible to change hostname
"""
```
The test specifaction can be genererated with:
$ make test-spec
[9PM]: https://github.com/rical/9pm
[Qeneth]: https://github.com/wkz/qeneth
+6
View File
@@ -1,6 +1,10 @@
menu "Packages"
source "$BR2_EXTERNAL_INFIX_PATH/package/bin/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/confd/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/confd-test-mode/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/curios-httpd/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/curios-nftables/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/execd/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/gencert/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/statd/Config.in"
@@ -31,4 +35,6 @@ source "$BR2_EXTERNAL_INFIX_PATH/package/libyang-cpp/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/sysrepo-cpp/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/rousette/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/nghttp2-asio/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/date-cpp/Config.in"
endmenu
+8
View File
@@ -0,0 +1,8 @@
config BR2_PACKAGE_BIN
bool "bin"
select BR2_PACKAGE_SYSREPO
select BR2_PACKAGE_LIBITE
help
Misc. tools for CLI and shell users.
https://github.com/kernelkit/infix
+1
View File
@@ -0,0 +1 @@
sha256 d2f96418893ac66156d0e691cda189b0d85ae1d814065d1d9aa1845383100f46 LICENSE
+21
View File
@@ -0,0 +1,21 @@
################################################################################
#
# bin
#
################################################################################
BIN_VERSION = 1.0
BIN_SITE_METHOD = local
BIN_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/bin
BIN_LICENSE = BSD-3-Clause
BIN_LICENSE_FILES = LICENSE
BIN_REDISTRIBUTE = NO
BIN_DEPENDENCIES = sysrepo libite
BIN_CONF_OPTS = --prefix= --disable-silent-rules
BIN_AUTORECONF = YES
define BIN_CONF_ENV
CFLAGS="$(INFIX_CFLAGS)"
endef
$(eval $(autotools-package))
+10
View File
@@ -0,0 +1,10 @@
config BR2_PACKAGE_CONFD_TEST_MODE
bool "confd test mode"
depends on BR2_PACKAGE_CONFD
select BR2_PACKAGE_LIBITE
select BR2_PACKAGE_LIBYANG
select BR2_PACKAGE_SYSREPO
select BR2_PACKAGE_LIBSRX
help
A companion plugin to confd providing functionality required to
run tests with Infamy, i.e., enable Infix test mode.
@@ -0,0 +1,32 @@
CONFD_TEST_MODE_VERSION = 1.0
CONFD_TEST_MODE_SITE_METHOD = local
CONFD_TEST_MODE_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/test-mode
CONFD_TEST_MODE_LICENSE = BSD-3-Clause
CONFD_TEST_MODE_LICENSE_FILES = LICENSE
CONFD_TEST_MODE_REDISTRIBUTE = NO
CONFD_TEST_MODE_DEPENDENCIES = sysrepo libite libyang confd
CONFD_TEST_MODE_AUTORECONF = YES
CONFD_TEST_MODE_SYSREPO_SHM_PREFIX = sr_buildroot$(subst /,_,$(CONFIG_DIR))_test_mode
COMMON_SYSREPO_ENV = \
SYSREPO_SHM_PREFIX=$(CONFD_SYSREPO_SHM_PREFIX) \
SYSREPOCTL_EXECUTABLE="$(HOST_DIR)/bin/sysrepoctl" \
SYSREPOCFG_EXECUTABLE="$(HOST_DIR)/bin/sysrepocfg" \
SEARCH_PATH="$(TARGET_DIR)/usr/share/yang/modules/confd/"
define CONFD_TEST_MODE_INSTALL_YANG_MODULES
$(COMMON_SYSREPO_ENV) \
SEARCH_PATH="$(TARGET_DIR)/usr/share/yang/modules/test-mode/" $(BR2_EXTERNAL_INFIX_PATH)/utils/sysrepo-load-modules.sh $(@D)/yang/test-mode.inc
endef
define CONFD_TEST_MODE_PERMISSIONS
/etc/sysrepo/data/ r 660 root wheel - - - - -
/etc/sysrepo/data d 770 root wheel - - - - -
endef
define CONFD_TEST_MODE_CLEANUP
rm -f /dev/shm/$(CONFD_TEST_MODE_SYSREPO_SHM_PREFIX)*
endef
CONFD_TEST_MODE_PRE_INSTALL_TARGET_HOOKS += CONFD_TEST_MODE_CLEANUP
CONFD_TEST_MODE_POST_INSTALL_TARGET_HOOKS += CONFD_TEST_MODE_INSTALL_YANG_MODULES
$(eval $(autotools-package))
+6 -6
View File
@@ -12,20 +12,20 @@ service name:confd log:prio:daemon.err <run/bootstrap/success> \
-- Configuration daemon
# Bootstrap system with startup-config
run name:startup log:prio:user.notice norestart <pid/confd> \
[S] /usr/libexec/confd/load startup-config \
run name:startup log:prio:user.notice norestart <pid/confd> env:/etc/default/confd \
[S] /usr/libexec/confd/load -t $CONFD_TIMEOUT startup-config \
-- Loading startup-config
# Run if loading startup-config fails for some reason
run name:failure log:prio:user.critical norestart <pid/confd> if:<run/startup/failure> \
[S] /usr/libexec/confd/load failure-config \
run name:failure log:prio:user.critical norestart <pid/confd> env:/etc/default/confd if:<run/startup/failure> \
[S] /usr/libexec/confd/load -t $CONFD_TIMEOUT failure-config \
-- Loading failure-config
run name:error :2 log:console norestart if:<run/failure/failure> \
[S] /usr/libexec/confd/error --
service name:netopeer notify:none log <pid/confd> \
[12345] netopeer2-server -F -t 60 -v 1 \
service name:netopeer notify:none log <pid/confd> env:/etc/default/confd \
[12345] netopeer2-server -F -t $CONFD_TIMEOUT -v 1 \
-- NETCONF server
# Create initial /etc/resolv.conf after successful bootstrap
+1 -1
View File
@@ -4,7 +4,7 @@
#
################################################################################
CONFD_VERSION = 1.0
CONFD_VERSION = 1.2
CONFD_SITE_METHOD = local
CONFD_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/confd
CONFD_LICENSE = BSD-3-Clause
+3 -3
View File
@@ -2,8 +2,8 @@ config BR2_PACKAGE_CURIOS_HTTPD
bool "curiOS-httpd"
help
Example of how to bundle an OCI archive of curiOS-httpd in
/lib/oci for the given target architecture. OCI archives
can also be bundled in post-build.sh, but with packaging
the "source" is bundled in SDK builds.
/lib/oci for the given target architecture. OCI archives can
also be bundled in post-build.sh, but with packaging all the
"source" tarballs are bundled for SDK builds (archiving).
https://github.com/kernelkit/curiOS
+2 -2
View File
@@ -9,11 +9,11 @@ CURIOS_HTTPD_SOURCE = curios-httpd-oci-$(GO_GOARCH)-$(CURIOS_HTTPD_VERSION).tar.
CURIOS_HTTPD_SITE = https://github.com/kernelkit/curiOS/releases/download/$(CURIOS_HTTPD_VERSION)
CURIOS_HTTPD_LICENSE = GPL
CURIOS_HTTPD_LICENSE_FILES = COPYING
CURIOS_HTTPD_INSTALL_TARGET = YES
define CURIOS_HTTPD_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/lib/oci
(cd $(@D)/.. && $(TAR) cfz $(TARGET_DIR)/lib/oci/$(notdir $(@D)).tar.gz $(notdir $(@D)))
cp $(CURIOS_HTTPD_DL_DIR)/$(CURIOS_HTTPD_SOURCE) \
$(TARGET_DIR)/lib/oci/$(notdir $(@D)).tar.gz
endef
$(eval $(generic-package))
+9
View File
@@ -0,0 +1,9 @@
config BR2_PACKAGE_CURIOS_NFTABLES
bool "curiOS-nftables"
help
Example of how to bundle an OCI archive of curiOS-nftables in
/lib/oci for the given target architecture. OCI archives can
also be bundled in post-build.sh, but with packaging all the
"source" tarballs are bundled for SDK builds (archiving).
https://github.com/kernelkit/curiOS
@@ -0,0 +1,4 @@
# Locally computed
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING
sha256 f25651505bf4fc635dc8d391f377b1116837e99dee522ce0691c15b090cee818 curios-nftables-oci-arm64-v24.05.0.tar.gz
sha256 025c2a5d6c71c62ebbe6f96d8b9ffa3235d6812e87b51645f6e89357d9762669 curios-nftables-oci-amd64-v24.05.0.tar.gz
@@ -0,0 +1,20 @@
################################################################################
#
# curios-nftables
#
################################################################################
CURIOS_NFTABLES_VERSION = v24.05.0
CURIOS_NFTABLES_SOURCE = curios-nftables-oci-$(GO_GOARCH)-$(CURIOS_NFTABLES_VERSION).tar.gz
CURIOS_NFTABLES_SITE = https://github.com/kernelkit/curiOS/releases/download/$(CURIOS_NFTABLES_VERSION)
CURIOS_NFTABLES_LICENSE = GPL
CURIOS_NFTABLES_LICENSE_FILES = COPYING
CURIOS_NFTABLES_INSTALL_TARGET = YES
define CURIOS_NFTABLES_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/lib/oci
cp $(CURIOS_NFTABLES_DL_DIR)/$(CURIOS_NFTABLES_SOURCE) \
$(TARGET_DIR)/lib/oci/$(notdir $(@D)).tar.gz
endef
$(eval $(generic-package))
@@ -0,0 +1,29 @@
From c8ec120afa3a66674ef30b10490eeeb36d806eed Mon Sep 17 00:00:00 2001
From: Tomas Pecka <peckato1@fit.cvut.cz>
Date: Fri, 17 Feb 2023 13:50:17 +0100
Subject: [PATCH] Fix getting current timezone on ARM-based devices
Our software using date on buildroot ARM-based device terminates with an
uncaught exception.
terminate called after throwing an instance of 'std::runtime_error'
what(): posix/Etc/UTC not found in timezone database
I have applied workaround from [1].
[1] https://github.com/HowardHinnant/date/issues/252
Bug: https://github.com/HowardHinnant/date/issues/252
---
src/tz.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tz.cpp b/src/tz.cpp
index bd9fad4..eea48ce 100644
--- a/src/tz.cpp
+++ b/src/tz.cpp
@@ -3925,7 +3925,7 @@ sniff_realpath(const char* timezone)
if (realpath(timezone, rp) == nullptr)
throw system_error(errno, system_category(), "realpath() failed");
auto result = extract_tz_name(rp);
- return result != "posixrules";
+ return result.find("posix") == decltype(result)::npos;
}
const time_zone*
--
2.39.2
+6
View File
@@ -0,0 +1,6 @@
config BR2_PACKAGE_DATE_CPP
bool "date-cpp"
help
A date and time library based on the C++11/14/17 <chrono> header
https://github.com/HowardHinnant/date
+3
View File
@@ -0,0 +1,3 @@
# Locally calculated
sha256 c90f6c00fb961170560299cbda28ca2d45804913aa8b2a9f36dbb8e0028d6930 LICENSE.txt
sha256 7a390f200f0ccd207e8cff6757e04817c1a0aec3e327b006b7eb451c57ee3538 date-3.0.1.tar.gz
+10
View File
@@ -0,0 +1,10 @@
DATE_CPP_VERSION = 3.0.1
DATE_CPP_SITE = $(call github,HowardHinnant,date,v$(DATE_CPP_VERSION))
DATE_CPP_INSTALL_STAGING = YES
DATE_CPP_LICENSE = MIT
DATE_CPP_LICENSE_FILES = LICENSE.txt
DATE_CPP_CONF_OPTS = \
-DBUILD_TZ_LIB=ON \
-DUSE_SYSTEM_TZ_DB:BOOL=ON \
-DENABLE_DATE_TESTING=OFF
$(eval $(cmake-package))
@@ -0,0 +1,67 @@
From 46ffa81f5c88ce95db011369d8bfb802313e4217 Mon Sep 17 00:00:00 2001
From: Joachim Wiberg <troglobit@gmail.com>
Date: Thu, 17 Oct 2024 14:23:24 +0200
Subject: [PATCH 1/6] Only mark rdeps dirty if main service is nohup
Organization: Addiva Elektronik
This patch changes a behavior that's been default since Finit 4.0,
introduced in 4d05bf9 with 4.0-rc2.
If service B depends on A and A needs to be reloaded, then B may be
affected. If A is declared as NOHUP <!>, then A will be stopped and
restarted, during which time the condition it provides is removed,
and B will also be stopped.
However, and as of this patch, if A is declared supporting HUP, then the
condition A provides will only go into flux, during which time B will be
SIGSTOPed instead of needing to be reloaded.
Fix #415
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
---
src/service.c | 8 ++++++++
src/svc.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/src/service.c b/src/service.c
index 61be85c..b995ff4 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2001,6 +2001,10 @@ static void svc_mark_affected(char *cond)
* Called on conf_reload() to update service reverse dependencies.
* E.g., if ospfd depends on zebra and the zebra Finit conf has
* changed, we need to mark the ospfd Finit conf as changed too.
+ *
+ * However, a daemon that depends on syslogd (sysklogd project), need
+ * not be reloeaded (SIGHUP'ed or stop/started) because syslogd support
+ * reloading its configuration file on SIGHUP.
*/
void service_update_rdeps(void)
{
@@ -2012,6 +2016,10 @@ void service_update_rdeps(void)
if (!svc_is_changed(svc))
continue;
+ /* Service supports reloading conf without stop/start */
+ if (!svc_is_nohup(svc))
+ continue; /* Yup, no need to stop start rdeps */
+
svc_mark_affected(mkcond(svc, cond, sizeof(cond)));
}
}
diff --git a/src/svc.h b/src/svc.h
index d00ac14..e2f6bd8 100644
--- a/src/svc.h
+++ b/src/svc.h
@@ -259,6 +259,7 @@ static inline int svc_is_tty (svc_t *svc) { return svc && SVC_TYPE_TTY
static inline int svc_is_runtask (svc_t *svc) { return svc && (SVC_TYPE_RUNTASK & svc->type);}
static inline int svc_is_forking (svc_t *svc) { return svc && svc->forking; }
static inline int svc_is_manual (svc_t *svc) { return svc && svc->manual; }
+static inline int svc_is_nohup (svc_t *svc) { return svc && (0 == svc->sighup); }
static inline int svc_in_runlevel (svc_t *svc, int runlevel) { return svc && ISSET(svc->runlevels, runlevel); }
static inline int svc_nohup (svc_t *svc) { return svc && (0 == svc->sighup || 0 != svc->args_dirty); }
--
2.43.0

Some files were not shown because too many files have changed in this diff Show More