mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-28 19:53:01 +02:00
Compare commits
7
Commits
v26.02.1-rc1
...
v26.02.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7176666340 | ||
|
|
0b475a7ce6 | ||
|
|
2e9e5858b9 | ||
|
|
4c8b62d1b1 | ||
|
|
e17780f197 | ||
|
|
b4ea26961f | ||
|
|
be3891c2f0 |
@@ -7,7 +7,7 @@ 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/netd/conf.d/${interface}-dhcp.conf"
|
||||
NAME="/etc/net.d/${interface}-dhcp.conf"
|
||||
NEXT="${NAME}+"
|
||||
|
||||
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
|
||||
@@ -118,8 +118,6 @@ set_dhcp_routes()
|
||||
# Reduce changes needed by comparing with previous route(s)
|
||||
cmp -s "$NAME" "$NEXT" && return
|
||||
mv "$NEXT" "$NAME"
|
||||
|
||||
initctl reload netd
|
||||
}
|
||||
|
||||
clr_dhcp_routes()
|
||||
@@ -127,8 +125,6 @@ clr_dhcp_routes()
|
||||
log "deleting DHCP routes"
|
||||
[ -f "$NAME" ] || return
|
||||
rm "$NAME"
|
||||
|
||||
initctl reload netd
|
||||
}
|
||||
|
||||
clr_dhcp_addresses()
|
||||
|
||||
@@ -27,7 +27,7 @@ BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNA
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.16"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.17"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/linux_defconfig"
|
||||
BR2_LINUX_KERNEL_INSTALL_TARGET=y
|
||||
|
||||
@@ -27,7 +27,7 @@ BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNA
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.16"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.17"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/linux_defconfig"
|
||||
BR2_LINUX_KERNEL_INSTALL_TARGET=y
|
||||
|
||||
@@ -28,7 +28,7 @@ BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNA
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.16"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.17"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/arm/linux_defconfig"
|
||||
BR2_LINUX_KERNEL_INSTALL_TARGET=y
|
||||
|
||||
@@ -28,7 +28,7 @@ BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNA
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.16"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.17"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/arm/linux_defconfig"
|
||||
BR2_LINUX_KERNEL_INSTALL_TARGET=y
|
||||
|
||||
@@ -26,7 +26,7 @@ BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNA
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.16"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.17"
|
||||
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
|
||||
|
||||
@@ -26,7 +26,7 @@ BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNA
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.16"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.17"
|
||||
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
|
||||
|
||||
+3
-2
@@ -3,12 +3,12 @@ Change Log
|
||||
|
||||
All notable changes to the project are documented in this file.
|
||||
|
||||
[v26.02.1][] - 2026-03-11
|
||||
[v26.02.1][] - 2026-03-13
|
||||
-------------------------
|
||||
|
||||
### Changes
|
||||
|
||||
- Upgrade Linux kernel to 6.18.16 (LTS)
|
||||
- Upgrade Linux kernel to 6.18.17 (LTS)
|
||||
- Add support for disabling WiFi and GPS features in builds
|
||||
- Add OSPF point-to-multipoint (P2MP) and hybrid interface type support. This
|
||||
also includes support for setting static neighbors, issue #1426
|
||||
@@ -17,6 +17,7 @@ All notable changes to the project are documented in this file.
|
||||
|
||||
- Fix #1389: legacy name limit in firewalld triggered problems with policy names
|
||||
- Fix #1416: `show firewall` command show an error when the firewall is disabled
|
||||
- Fix #1438: default route from DHCP client not set at boot, regression in v26.02.0
|
||||
- Fix instabilities in Zebra route manager after Frr upgrade in v26.02.0
|
||||
- Fix regression in MVEBU SafeXcel Crypto Engine for Marvell Armada SOCs (37xx,
|
||||
7k, 8k, and CN913x series). Firmware package lost in v26.01.0
|
||||
|
||||
@@ -2,9 +2,10 @@ config BR2_PACKAGE_NETD
|
||||
bool "netd"
|
||||
select BR2_PACKAGE_LIBITE
|
||||
select BR2_PACKAGE_LIBCONFUSE
|
||||
select BR2_PACKAGE_LIBEV
|
||||
help
|
||||
Network route daemon. Manages static routes and RIP routing.
|
||||
Reads configuration from /etc/netd/conf.d/*.conf.
|
||||
Reads configuration from /etc/net.d/*.conf.
|
||||
|
||||
With FRR: Full routing via gRPC, vtysh, or frr.conf.
|
||||
Without FRR: Standalone Linux backend via rtnetlink.
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
NETD_VERSION = 1.0
|
||||
NETD_VERSION = 1.1.0
|
||||
NETD_SITE_METHOD = local
|
||||
NETD_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/netd
|
||||
NETD_LICENSE = BSD-3-Clause
|
||||
NETD_LICENSE_FILES = LICENSE
|
||||
NETD_REDISTRIBUTE = NO
|
||||
NETD_DEPENDENCIES = libite libconfuse jansson
|
||||
NETD_DEPENDENCIES = libite libconfuse jansson libev
|
||||
NETD_AUTORECONF = YES
|
||||
|
||||
NETD_CONF_ENV = CFLAGS="$(INFIX_CFLAGS)"
|
||||
@@ -34,6 +34,10 @@ else
|
||||
NETD_CONF_OPTS += --without-frr
|
||||
endif
|
||||
|
||||
define NETD_INSTALL_EXTRA
|
||||
cp $(NETD_PKGDIR)/tmpfiles.conf $(TARGET_DIR)/etc/tmpfiles.d/netd.conf
|
||||
endef
|
||||
|
||||
NETD_TARGET_FINALIZE_HOOKS += NETD_INSTALL_EXTRA
|
||||
|
||||
$(eval $(autotools-package))
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
d /etc/net.d - - -
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 2ca55761d22dbc39d26862cf94577cf44f4b85a0 Mon Sep 17 00:00:00 2001
|
||||
From 346def32eb16c04f267c1da13735945c9a54231f Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Tue, 19 Sep 2023 18:38:10 +0200
|
||||
Subject: [PATCH 01/33] net: phy: marvell10g: Support firmware loading on
|
||||
88X3310
|
||||
Organization: Wires
|
||||
|
||||
When probing, if a device is waiting for firmware to be loaded into
|
||||
its RAM, ask userspace for the binary and load it over XMDIO.
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 554729f2a8c83f617663c097cc389b5c791db8aa Mon Sep 17 00:00:00 2001
|
||||
From 77b517d44bdffdf6b34e6349c1dd2fa3b82f8a49 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Tue, 21 Nov 2023 20:15:24 +0100
|
||||
Subject: [PATCH 02/33] net: phy: marvell10g: Fix power-up when strapped to
|
||||
start powered down
|
||||
Organization: Wires
|
||||
|
||||
On devices which are hardware strapped to start powered down (PDSTATE
|
||||
== 1), make sure that we clear the power-down bit on all units
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
From 7090bf6cbf332d9a38e04a58b026d2d00701ca67 Mon Sep 17 00:00:00 2001
|
||||
From 9e51a2fa9f7aa8bace041a943b517faa47f30624 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Wed, 15 Nov 2023 20:58:42 +0100
|
||||
Subject: [PATCH 03/33] net: phy: marvell10g: Add LED support for 88X3310
|
||||
Organization: Wires
|
||||
|
||||
Pickup the LEDs from the state in which the hardware reset or
|
||||
bootloader left them, but also support further configuration via
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 7776e8acf62062136892b9623c24898c09778e48 Mon Sep 17 00:00:00 2001
|
||||
From d6da0f58dc1a27bf6a73ac8842e7830772199550 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Tue, 12 Dec 2023 09:51:05 +0100
|
||||
Subject: [PATCH 04/33] net: phy: marvell10g: Support LEDs tied to a single
|
||||
media side
|
||||
Organization: Wires
|
||||
|
||||
In a combo-port setup, i.e. where both the copper and fiber interface
|
||||
are available to the user, the LEDs may be physically located either
|
||||
+5
-4
@@ -1,7 +1,8 @@
|
||||
From 96ce164208881c981e9e8b1231e2b45957a89b5e Mon Sep 17 00:00:00 2001
|
||||
From bbfb5ff1a1deac6617e889e9eae61ad90932372d Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Wed, 27 Mar 2024 10:10:19 +0100
|
||||
Subject: [PATCH 05/33] net: phy: Do not resume PHY when attaching
|
||||
Organization: Wires
|
||||
|
||||
The PHY should not start negotiating with its link-partner until
|
||||
explicitly instructed to do so.
|
||||
@@ -19,7 +20,7 @@ administratively down.
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
|
||||
index 7a67c900e79a..5c61faf4b10a 100644
|
||||
index 2353d6eced68..9b0983453393 100644
|
||||
--- a/drivers/net/phy/phy_device.c
|
||||
+++ b/drivers/net/phy/phy_device.c
|
||||
@@ -1750,7 +1750,6 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
|
||||
@@ -27,6 +28,6 @@ index 7a67c900e79a..5c61faf4b10a 100644
|
||||
goto error;
|
||||
|
||||
- phy_resume(phydev);
|
||||
if (!phydev->is_on_sfp_module)
|
||||
phy_led_triggers_register(phydev);
|
||||
|
||||
/**
|
||||
* If the external phy used by current mac interface is managed by
|
||||
+4
-3
@@ -1,8 +1,9 @@
|
||||
From 74ce9cb9a4845537644a67769ee9f441bf9d3a78 Mon Sep 17 00:00:00 2001
|
||||
From 86d59814723739aae2e0dccc1d5143e99239e517 Mon Sep 17 00:00:00 2001
|
||||
From: Joachim Wiberg <troglobit@gmail.com>
|
||||
Date: Mon, 4 Mar 2024 16:47:28 +0100
|
||||
Subject: [PATCH 06/33] net: bridge: avoid classifying unknown multicast as
|
||||
mrouters_only
|
||||
Organization: Wires
|
||||
|
||||
Unknown multicast, MAC/IPv4/IPv6, should always be flooded according to
|
||||
the per-port mcast_flood setting, as well as to detected and configured
|
||||
@@ -61,7 +62,7 @@ index c37e52e2f29a..0759bc37d6f0 100644
|
||||
/* shouldn't be called with unsupported options */
|
||||
WARN_ON(1);
|
||||
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
|
||||
index a818fdc22da9..3cdb97ded410 100644
|
||||
index 525d4eccd194..6278dfc9612f 100644
|
||||
--- a/net/bridge/br_device.c
|
||||
+++ b/net/bridge/br_device.c
|
||||
@@ -89,10 +89,10 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
@@ -140,7 +141,7 @@ index dea09096ad0f..f0a613238e0d 100644
|
||||
continue;
|
||||
break;
|
||||
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
|
||||
index 1405f1061a54..1ae4b4173821 100644
|
||||
index 2cbae0f9ae1f..0c539bf4bebe 100644
|
||||
--- a/net/bridge/br_input.c
|
||||
+++ b/net/bridge/br_input.c
|
||||
@@ -186,9 +186,13 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From e7b3717762434f780616a0b641169f5cfa1a2398 Mon Sep 17 00:00:00 2001
|
||||
From 9fa94b200cb73d0d03f724610e53b8019a6ebad2 Mon Sep 17 00:00:00 2001
|
||||
From: Joachim Wiberg <troglobit@gmail.com>
|
||||
Date: Tue, 5 Mar 2024 06:44:41 +0100
|
||||
Subject: [PATCH 07/33] net: bridge: Ignore router ports when forwarding L2
|
||||
multicast
|
||||
Organization: Wires
|
||||
|
||||
Multicast router ports are either statically configured or learned from
|
||||
control protocol traffic (IGMP/MLD/PIM). These protocols regulate IP
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From fabc6f846e244fd2b67d26155d644238505b949b Mon Sep 17 00:00:00 2001
|
||||
From 53004f71947c52aab8e6e3fabc3fd5d78a3c643f Mon Sep 17 00:00:00 2001
|
||||
From: Joachim Wiberg <troglobit@gmail.com>
|
||||
Date: Thu, 4 Apr 2024 16:36:30 +0200
|
||||
Subject: [PATCH 08/33] net: bridge: drop delay for applying strict multicast
|
||||
filtering
|
||||
Organization: Wires
|
||||
|
||||
This *local* patch drops the initial delay before applying strict multicast
|
||||
filtering, introduced in [1] and recently updated in [2].
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 4ee3858a7d7f02746187d8bbc6011038747cab35 Mon Sep 17 00:00:00 2001
|
||||
From 7229b8a8650191d42ff67d584751ab49dbcd7ed8 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Thu, 16 May 2024 14:51:54 +0200
|
||||
Subject: [PATCH 09/33] net: bridge: Differentiate MDB additions from
|
||||
modifications
|
||||
Organization: Wires
|
||||
|
||||
Before this change, the reception of an IGMPv3 report (and analogously
|
||||
for MLDv2) that adds a new group, would trigger two MDB RTM_NEWMDB
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 319ed7a2257bd18b5b0d23c9f24af9fd127b7667 Mon Sep 17 00:00:00 2001
|
||||
From 5b8492fa5bc5b79455e79a8e37498ecb93ee5359 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Fri, 24 Nov 2023 23:29:55 +0100
|
||||
Subject: [PATCH 10/33] nvmem: layouts: onie-tlv: Let device probe even when
|
||||
TLV is invalid
|
||||
Organization: Wires
|
||||
|
||||
Before this change, probing an NVMEM device, expected to contain a
|
||||
valid TLV, would fail if it had not been provisioned yet. But an
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 0ee33120c15d36ea49121936acb0b9cb860e0f5f Mon Sep 17 00:00:00 2001
|
||||
From 9f4c2b07839ef00084ed542c48149f0f335dd760 Mon Sep 17 00:00:00 2001
|
||||
From: Joachim Wiberg <troglobit@gmail.com>
|
||||
Date: Sun, 11 Aug 2024 11:27:35 +0200
|
||||
Subject: [PATCH 11/33] net: usb: r8152: add r8153b support for link/activity
|
||||
LEDs
|
||||
Organization: Wires
|
||||
|
||||
This patch adds support for the link/activity LEDs on the NanoPi R2S
|
||||
and OrangePi R1 Plus.
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From cf134950928be5c5955cc70c69e273a316bac69f Mon Sep 17 00:00:00 2001
|
||||
From 3ad4ee7ae3a89aada6d57176c07cef526d9c96eb Mon Sep 17 00:00:00 2001
|
||||
From: Joachim Wiberg <troglobit@gmail.com>
|
||||
Date: Sun, 10 Aug 2025 18:52:54 +0200
|
||||
Subject: [PATCH 12/33] arm64: dts: mediatek: mt7986a: rename BPi R3 ports to
|
||||
match case
|
||||
Organization: Wires
|
||||
|
||||
For ref. see: https://wiki.banana-pi.org/File:Bpi-r3_Metal_case.jpg
|
||||
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 799998c00feee44d4c74556022904ba7a0bdfac8 Mon Sep 17 00:00:00 2001
|
||||
From 3250cc2366b749241d615615ce2ea0d768bb4921 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Walström <lazzer@gmail.com>
|
||||
Date: Wed, 20 Aug 2025 21:38:24 +0200
|
||||
Subject: [PATCH 13/33] drm/panel-simple: Add a timing for the Raspberry Pi 7"
|
||||
panel
|
||||
Organization: Wires
|
||||
|
||||
The Raspberry Pi 7" 800x480 panel uses a Toshiba TC358762 DSI
|
||||
to DPI bridge chip, so there is a requirement for the timings
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
From f01bf9ba38f75e3ef290cdd2a22df025768dd8b8 Mon Sep 17 00:00:00 2001
|
||||
From 642ead96253f70bf7c0fcca3c2fa85e73914bb33 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Walström <lazzer@gmail.com>
|
||||
Date: Thu, 21 Aug 2025 11:20:23 +0200
|
||||
Subject: [PATCH 14/33] input:touchscreen:edt-ft5x06: Add polled mode
|
||||
Organization: Wires
|
||||
|
||||
Not all hardware has interrupts therefore we need
|
||||
to poll the touchscreen.
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From dd7bb94f604192615f1f73a362fb0e2471ff8e1b Mon Sep 17 00:00:00 2001
|
||||
From 43a979e0aa5701c0c1c0c0e9d57800bd0ef01faa Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Tue, 12 Mar 2024 10:27:24 +0100
|
||||
Subject: [PATCH 15/33] [FIX] net: dsa: mv88e6xxx: Fix timeout on waiting for
|
||||
PPU on 6393X
|
||||
Organization: Wires
|
||||
|
||||
In a multi-chip setup, delays of up to 750ms are observed before the
|
||||
device (6393X) signals completion of PPU initialization (Global 1,
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 5dbb37d98861fab5cdf35947406133b494850d07 Mon Sep 17 00:00:00 2001
|
||||
From 76efa741dff5a8ad7d31a3d6b676c564397c88e6 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Wed, 27 Mar 2024 15:52:43 +0100
|
||||
Subject: [PATCH 16/33] net: dsa: mv88e6xxx: Improve indirect register access
|
||||
perf on 6393
|
||||
Organization: Wires
|
||||
|
||||
When operating in multi-chip mode, the 6393 family maps a subset of
|
||||
commonly used global registers to the outermost address space (in
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From ef510ee5006cb4d34bbf53edc2c5d82cee557a56 Mon Sep 17 00:00:00 2001
|
||||
From 7901aa874746fcd698d57099e01690ca591d9361 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Mon, 22 Apr 2024 23:18:01 +0200
|
||||
Subject: [PATCH 17/33] net: dsa: mv88e6xxx: Honor ports being managed via
|
||||
in-band-status
|
||||
Organization: Wires
|
||||
|
||||
Keep all link parameters in their unforced states when the port is
|
||||
declared as being managed via in-band-status, and let the MAC
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From cb18e0e47ef6696d7e2949af53c6f224ff112160 Mon Sep 17 00:00:00 2001
|
||||
From bff65cd654873c1fe2910f1ab8a757539fa920b7 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Wed, 24 Apr 2024 22:41:04 +0200
|
||||
Subject: [PATCH 18/33] net: dsa: mv88e6xxx: Limit rsvd2cpu policy to user
|
||||
ports on 6393X
|
||||
Organization: Wires
|
||||
|
||||
For packets with a DA in the IEEE reserved L2 group range, originating
|
||||
from a CPU, forward it as normal, rather than classifying it as
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 68e1ad6de79b30163ee9c610174e704db44f9c29 Mon Sep 17 00:00:00 2001
|
||||
From a93d06218d7b7627c5327aa10c612471840eee05 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Tue, 28 May 2024 10:38:42 +0200
|
||||
Subject: [PATCH 19/33] net: dsa: tag_dsa: Use tag priority as initial
|
||||
skb->priority
|
||||
Organization: Wires
|
||||
|
||||
Use the 3-bit priority field from the DSA tag as the initial packet
|
||||
priority on ingress to the CPU.
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 973d7b6c0928d41ed86702c4b7e9d140c7acb443 Mon Sep 17 00:00:00 2001
|
||||
From c467011d7ea11c7c3f728dc73b433cc3c0b67b80 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Tue, 16 Jan 2024 16:00:55 +0100
|
||||
Subject: [PATCH 20/33] net: dsa: Support MDB memberships whose L2 addresses
|
||||
overlap
|
||||
Organization: Wires
|
||||
|
||||
Multiple IP multicast groups (32 for v4, 2^80 for v6) map to the same
|
||||
L2 address. This means that switchdev drivers may receive multiple MDB
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
From f23311c2898a40e0f330c3d21907d2d14ab66b85 Mon Sep 17 00:00:00 2001
|
||||
From d84d7cf2a2b00203ac6e2261fd3474e6c0c954ca Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Thu, 21 Mar 2024 19:12:15 +0100
|
||||
Subject: [PATCH 21/33] net: dsa: Support EtherType based priority overrides
|
||||
Organization: Wires
|
||||
|
||||
---
|
||||
include/net/dsa.h | 4 ++++
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 02a6215df9d126dbe0079eab7b4b95a49be072fe Mon Sep 17 00:00:00 2001
|
||||
From e556a41a4c568492a2723ca5de155edd22ddd913 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Fri, 22 Mar 2024 16:15:43 +0100
|
||||
Subject: [PATCH 22/33] net: dsa: mv88e6xxx: Support EtherType based priority
|
||||
overrides
|
||||
Organization: Wires
|
||||
|
||||
---
|
||||
drivers/net/dsa/mv88e6xxx/chip.c | 64 +++++++++++++++++++++++++++++
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
From 8de2cab0aef8e63e6f95d49ccf50aac05e3834d1 Mon Sep 17 00:00:00 2001
|
||||
From d3546da36444aa4679725ec839f08da518d4923b Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Tue, 28 May 2024 11:04:22 +0200
|
||||
Subject: [PATCH 23/33] net: dsa: mv88e6xxx: Add mqprio qdisc support
|
||||
Organization: Wires
|
||||
|
||||
Add support for attaching mqprio qdisc's to mv88e6xxx ports and use
|
||||
the packet's traffic class as the outgoing priority when no PCP bits
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 0de73e629b8fabb852a239a67e91954d15326c1b Mon Sep 17 00:00:00 2001
|
||||
From b7519c9fa980c3875d27b11ffd6981b0ed48e9b5 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Wed, 29 May 2024 13:20:41 +0200
|
||||
Subject: [PATCH 24/33] net: dsa: mv88e6xxx: Use VLAN prio over IP when both
|
||||
are available
|
||||
Organization: Wires
|
||||
|
||||
Switch the priority sourcing precdence to prefer VLAN PCP over IP
|
||||
DSCP, when both are available.
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 3caaed0cca0c4ca5719b0434a30aa8dec77ef717 Mon Sep 17 00:00:00 2001
|
||||
From 521ca7fd27093c4ddcddd662a6dfd21f000275b8 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Tue, 26 Nov 2024 19:45:59 +0100
|
||||
Subject: [PATCH 25/33] [FIX] net: dsa: mv88e6xxx: Trap locally terminated
|
||||
VLANs
|
||||
Organization: Wires
|
||||
|
||||
Before this change, in a setup like the following, packets assigned to
|
||||
VLAN 10 were forwarded between the switch ports, even though the
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From bd10307b97efc72d331b5fdf56721954e834df48 Mon Sep 17 00:00:00 2001
|
||||
From 89b2a6e022f85b415a46f49df0c93676834bf57c Mon Sep 17 00:00:00 2001
|
||||
From: Joachim Wiberg <troglobit@gmail.com>
|
||||
Date: Thu, 16 Jan 2025 12:35:12 +0100
|
||||
Subject: [PATCH 26/33] net: dsa: mv88e6xxx: collapse disabled state into
|
||||
blocking
|
||||
Organization: Wires
|
||||
|
||||
This patch changes the behavior of switchcore ports wrt. the port state.
|
||||
Instead of disabling the port, the driver now treats the disabled state
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 85b575912a77253cc45a8a50d75999b34ab8aa43 Mon Sep 17 00:00:00 2001
|
||||
From 63367ac49816e95fd4da9194d58d1f5074cf8119 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Wed, 12 Feb 2025 22:03:14 +0100
|
||||
Subject: [PATCH 27/33] net: dsa: mv88e6xxx: Only activate LAG offloading when
|
||||
bridged
|
||||
Organization: Wires
|
||||
|
||||
The current port isolation scheme for mv88e6xxx is detailed here:
|
||||
https://lore.kernel.org/netdev/20220203101657.990241-1-tobias@waldekranz.com/
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
From 971b21f938d66b6c6f1f5d54b20c4d732e5cf3d6 Mon Sep 17 00:00:00 2001
|
||||
From b5ccc175297291d19697cd775c6f2a5691828e68 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Walström <lazzer@gmail.com>
|
||||
Date: Wed, 14 Jan 2026 18:22:41 +0100
|
||||
Subject: [PATCH 28/33] net: dsa: mv88e6xxx: Add LED support for 6393X
|
||||
Organization: Wires
|
||||
|
||||
Original commit:
|
||||
commit 462277b926140ee2d231317e92afb6cabf640268
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
From 86a58b0b4b1d60d40a80f058e4f09c87da4093b4 Mon Sep 17 00:00:00 2001
|
||||
From 8c51a0724ae7b1ad5115282c954d4edc81364585 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Walström <lazzer@gmail.com>
|
||||
Date: Thu, 15 Jan 2026 22:47:37 +0100
|
||||
Subject: [PATCH 29/33] wifi: brcmfmac: support deletion and recreation of
|
||||
@@ -6,6 +6,7 @@ Subject: [PATCH 29/33] wifi: brcmfmac: support deletion and recreation of
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Organization: Wires
|
||||
|
||||
The Broadcom FullMAC firmware does not allow the primary interface
|
||||
(bsscfgidx 0) to be deleted - it always exists in firmware. However,
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
From 924750050148d937cf62e94f4a706a0be6f5ed02 Mon Sep 17 00:00:00 2001
|
||||
From 36e885ca1f4115203e05e2886ae32563247b3b97 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Walström <lazzer@gmail.com>
|
||||
Date: Mon, 19 Jan 2026 13:06:53 +0100
|
||||
Subject: [PATCH 30/33] wifi: brcmfmac: check connection state before querying
|
||||
@@ -6,6 +6,7 @@ Subject: [PATCH 30/33] wifi: brcmfmac: check connection state before querying
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Organization: Wires
|
||||
|
||||
In station mode, brcmf_cfg80211_get_station() queries the firmware for
|
||||
station info even when not connected to an AP. This results in error
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
From 17a580919c5be64b94ccc9e11d0c52b990053485 Mon Sep 17 00:00:00 2001
|
||||
From 5463dd561cd1076e7f18a5119acc969c5f0ab989 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Walström <lazzer@gmail.com>
|
||||
Date: Tue, 20 Jan 2026 20:12:10 +0100
|
||||
Subject: [PATCH 31/33] wifi: brcmfmac: suppress log spam for
|
||||
@@ -6,6 +6,7 @@ Subject: [PATCH 31/33] wifi: brcmfmac: suppress log spam for
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Organization: Wires
|
||||
|
||||
When scanning, the driver attempts to set each channel and logs an
|
||||
error if the firmware rejects it. For regulatory-restricted channels,
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
From 544345cb92b080c77a62eadccb92d07190bac7d1 Mon Sep 17 00:00:00 2001
|
||||
From 1f631f03e316387caf2af8ebc082796ce843c26c Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Walström <lazzer@gmail.com>
|
||||
Date: Tue, 20 Jan 2026 20:18:45 +0100
|
||||
Subject: [PATCH 32/33] wifi: brcmfmac: reduce log noise during AP to station
|
||||
@@ -6,6 +6,7 @@ Subject: [PATCH 32/33] wifi: brcmfmac: reduce log noise during AP to station
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Organization: Wires
|
||||
|
||||
When transitioning from AP mode to station mode (e.g., hostapd stopping
|
||||
and wpa_supplicant starting), several non-fatal errors can occur:
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
From 5a1dbf99922519d4c36b93c16128c4419da35f30 Mon Sep 17 00:00:00 2001
|
||||
From d88dde71434c48f78d44803e467adbc6633d4b10 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Walström <lazzer@gmail.com>
|
||||
Date: Tue, 17 Feb 2026 21:59:59 +0100
|
||||
Subject: [PATCH 33/33] net: phy: air_en8811h: add OF device table for
|
||||
auto-loading
|
||||
Organization: Wires
|
||||
|
||||
mdio_uevent() only emits an OF-style MODALIAS via
|
||||
of_device_uevent_modalias(), never the mdio: binary format that
|
||||
@@ -1,2 +1,2 @@
|
||||
# Calculated with utils/kernel-refresh.sh
|
||||
sha256 4f21c01f4d04c1d1b3ed794153f8900802c92497be620b07c4869530f2d28ee3 linux-6.18.16.tar.xz
|
||||
sha256 2bff97ab0590bc5ccdd5b82286d5ef324828672126ebddc88d062e3ac65af80d linux-6.18.17.tar.xz
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#define XPATH_BASE_ "/ietf-routing:routing/control-plane-protocols/control-plane-protocol"
|
||||
#define XPATH_OSPF_ XPATH_BASE_ "/ietf-ospf:ospf"
|
||||
#define NETD_CONF "/etc/netd/conf.d/confd.conf"
|
||||
#define NETD_CONF "/etc/net.d/confd.conf"
|
||||
#define NETD_CONF_NEXT NETD_CONF "+"
|
||||
#define NETD_CONF_PREV NETD_CONF "-"
|
||||
#define OSPFD_CONF "/etc/frr/ospfd.conf"
|
||||
|
||||
@@ -6,7 +6,7 @@ netd_SOURCES = src/netd.c src/netd.h src/config.c src/config.h
|
||||
netd_CPPFLAGS = -D_DEFAULT_SOURCE -D_GNU_SOURCE -I$(srcdir)/src
|
||||
netd_CFLAGS = -W -Wall -Wextra
|
||||
netd_CFLAGS += $(libite_CFLAGS) $(libconfuse_CFLAGS) $(jansson_CFLAGS)
|
||||
netd_LDADD = $(libite_LIBS) $(libconfuse_LIBS) $(jansson_LIBS)
|
||||
netd_LDADD = $(libite_LIBS) $(libconfuse_LIBS) $(jansson_LIBS) $(EV_LIBS)
|
||||
|
||||
# Backend selection: FRR gRPC, FRR frr.conf, or Linux kernel
|
||||
if HAVE_FRR_GRPC
|
||||
|
||||
+4
-4
@@ -60,7 +60,7 @@ make install
|
||||
|
||||
netd uses [libconfuse](https://github.com/martinh/libconfuse) for configuration parsing, providing a clean and structured format.
|
||||
|
||||
Configuration files are placed in `/etc/netd/conf.d/` with the `.conf` extension. Files are processed in alphabetical order.
|
||||
Configuration files are placed in `/etc/net.d/` with the `.conf` extension. Files are processed in alphabetical order.
|
||||
|
||||
### Configuration Format
|
||||
|
||||
@@ -219,10 +219,10 @@ rip {
|
||||
|
||||
### Configuration Files
|
||||
|
||||
Configuration files must be placed in `/etc/netd/conf.d/` with the `.conf` extension:
|
||||
Configuration files must be placed in `/etc/net.d/` with the `.conf` extension:
|
||||
|
||||
```bash
|
||||
/etc/netd/conf.d/
|
||||
/etc/net.d/
|
||||
├── 10-static.conf # Static routes
|
||||
├── 20-rip.conf # RIP configuration
|
||||
└── 99-local.conf # Local overrides
|
||||
@@ -256,7 +256,7 @@ netd validates configuration on reload. Check syslog for errors.
|
||||
|
||||
```
|
||||
┌─────────┐
|
||||
│ confd │ Writes /etc/netd/conf.d/confd.conf
|
||||
│ confd │ Writes /etc/net.d/confd.conf
|
||||
└────┬────┘
|
||||
│ SIGHUP
|
||||
▼
|
||||
|
||||
+11
-1
@@ -1,5 +1,5 @@
|
||||
AC_PREREQ(2.61)
|
||||
AC_INIT([netd], [1.0.0], [https://github.com/kernelkit/infix/issues])
|
||||
AC_INIT([netd], [1.1.0], [https://github.com/kernelkit/infix/issues])
|
||||
AM_INIT_AUTOMAKE(1.11 foreign subdir-objects)
|
||||
AM_SILENT_RULES(yes)
|
||||
|
||||
@@ -81,6 +81,16 @@ PKG_CHECK_MODULES([libite], [libite >= 2.6.1])
|
||||
PKG_CHECK_MODULES([libconfuse], [libconfuse >= 3.0])
|
||||
PKG_CHECK_MODULES([jansson], [jansson >= 2.0])
|
||||
|
||||
AC_CHECK_HEADER([ev.h],
|
||||
[saved_LIBS="$LIBS"
|
||||
AC_CHECK_LIB([ev], [ev_loop_new],
|
||||
[EV_LIBS="-lev"],
|
||||
[AC_MSG_ERROR("libev not found")])
|
||||
LIBS="$saved_LIBS"],
|
||||
[AC_MSG_ERROR("ev.h not found")]
|
||||
)
|
||||
AC_SUBST([EV_LIBS])
|
||||
|
||||
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
||||
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
||||
|
||||
|
||||
+86
-41
@@ -2,6 +2,8 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/inotify.h>
|
||||
#include <ev.h>
|
||||
#include <libite/lite.h>
|
||||
|
||||
#include "netd.h"
|
||||
@@ -9,9 +11,6 @@
|
||||
|
||||
int debug;
|
||||
|
||||
static sig_atomic_t do_reload;
|
||||
static sig_atomic_t do_shutdown;
|
||||
|
||||
static struct route_head active_routes = TAILQ_HEAD_INITIALIZER(active_routes);
|
||||
static struct rip_config active_rip;
|
||||
|
||||
@@ -46,19 +45,7 @@ static int backend_apply(struct route_head *routes, struct rip_config *rip) {
|
||||
}
|
||||
#endif
|
||||
|
||||
static void sighup_handler(int sig)
|
||||
{
|
||||
(void)sig;
|
||||
|
||||
INFO("Got SIGHUP, reloading ...");
|
||||
do_reload = 1;
|
||||
}
|
||||
|
||||
static void sigterm_handler(int sig)
|
||||
{
|
||||
(void)sig;
|
||||
do_shutdown = 1;
|
||||
}
|
||||
static ev_timer retry_w;
|
||||
|
||||
static void route_list_free(struct route_head *head)
|
||||
{
|
||||
@@ -118,7 +105,7 @@ static void rip_config_free(struct rip_config *cfg)
|
||||
}
|
||||
}
|
||||
|
||||
static void reload(void)
|
||||
static void reload(struct ev_loop *loop)
|
||||
{
|
||||
struct route_head new_routes = TAILQ_HEAD_INITIALIZER(new_routes);
|
||||
struct rip_redistribute *redist;
|
||||
@@ -129,7 +116,7 @@ static void reload(void)
|
||||
struct route *r;
|
||||
int count = 0;
|
||||
|
||||
INFO("Reloading configuration");
|
||||
DEBUG("Reloading configuration");
|
||||
|
||||
rip_config_init(&new_rip);
|
||||
|
||||
@@ -148,11 +135,16 @@ static void reload(void)
|
||||
|
||||
/* Apply config via backend */
|
||||
if (backend_apply(&new_routes, &new_rip)) {
|
||||
ERROR("Failed applying config via backend");
|
||||
ERROR("Failed applying config via backend, retry in 5s");
|
||||
route_list_free(&new_routes);
|
||||
rip_config_free(&new_rip);
|
||||
ev_timer_stop(loop, &retry_w);
|
||||
ev_timer_set(&retry_w, 5., 0.);
|
||||
ev_timer_start(loop, &retry_w);
|
||||
pidfile(NULL);
|
||||
return;
|
||||
}
|
||||
ev_timer_stop(loop, &retry_w);
|
||||
|
||||
route_list_free(&active_routes);
|
||||
TAILQ_INIT(&active_routes);
|
||||
@@ -214,26 +206,59 @@ static void reload(void)
|
||||
}
|
||||
}
|
||||
|
||||
INFO("Configuration reloaded");
|
||||
pidfile(NULL);
|
||||
}
|
||||
|
||||
static void inotify_cb(struct ev_loop *loop, ev_io *w, int revents)
|
||||
{
|
||||
char buf[sizeof(struct inotify_event) + NAME_MAX + 1];
|
||||
|
||||
(void)revents;
|
||||
while (read(w->fd, buf, sizeof(buf)) > 0)
|
||||
;
|
||||
DEBUG("conf.d changed, triggering reload");
|
||||
reload(loop);
|
||||
}
|
||||
|
||||
static void sighup_cb(struct ev_loop *loop, ev_signal *w, int revents)
|
||||
{
|
||||
(void)w; (void)revents;
|
||||
INFO("Got SIGHUP, reloading ...");
|
||||
reload(loop);
|
||||
}
|
||||
|
||||
static void sigterm_cb(struct ev_loop *loop, ev_signal *w, int revents)
|
||||
{
|
||||
(void)w; (void)revents;
|
||||
ev_break(loop, EVBREAK_ALL);
|
||||
}
|
||||
|
||||
static void retry_cb(struct ev_loop *loop, ev_timer *w, int revents)
|
||||
{
|
||||
(void)w; (void)revents;
|
||||
reload(loop);
|
||||
}
|
||||
|
||||
static int usage(int rc)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"Usage: netd [-dh]\n"
|
||||
"Usage: netd [-dhv]\n"
|
||||
" -d Enable debug (log to stderr)\n"
|
||||
" -h Show this help text\n");
|
||||
" -h Show this help text\n"
|
||||
" -v Show version and exit\n");
|
||||
return rc;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct ev_loop *loop = EV_DEFAULT;
|
||||
ev_signal sighup_w, sigterm_w, sigint_w;
|
||||
ev_io inotify_w;
|
||||
int log_opts = LOG_PID | LOG_NDELAY;
|
||||
struct sigaction sa = { 0 };
|
||||
int ifd = -1;
|
||||
int c;
|
||||
|
||||
while ((c = getopt(argc, argv, "dhp:")) != -1) {
|
||||
while ((c = getopt(argc, argv, "dhv")) != -1) {
|
||||
switch (c) {
|
||||
case 'd':
|
||||
log_opts |= LOG_PERROR;
|
||||
@@ -241,6 +266,9 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
case 'h':
|
||||
return usage(0);
|
||||
case 'v':
|
||||
puts("v" PACKAGE_VERSION);
|
||||
return 0;
|
||||
default:
|
||||
return usage(1);
|
||||
}
|
||||
@@ -248,15 +276,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
openlog("netd", log_opts, LOG_DAEMON);
|
||||
setlogmask(LOG_UPTO(LOG_INFO));
|
||||
INFO("starting");
|
||||
|
||||
/* Set up signal handlers */
|
||||
sa.sa_handler = sighup_handler;
|
||||
sigaction(SIGHUP, &sa, NULL);
|
||||
|
||||
sa.sa_handler = sigterm_handler;
|
||||
sigaction(SIGTERM, &sa, NULL);
|
||||
sigaction(SIGINT, &sa, NULL);
|
||||
INFO("v%s starting", PACKAGE_VERSION);
|
||||
|
||||
if (backend_init()) {
|
||||
ERROR("Failed to initialize backend");
|
||||
@@ -267,19 +287,44 @@ int main(int argc, char *argv[])
|
||||
TAILQ_INIT(&active_routes);
|
||||
rip_config_init(&active_rip);
|
||||
|
||||
/* Initial load */
|
||||
do_reload = 1;
|
||||
/* Signal watchers */
|
||||
ev_signal_init(&sighup_w, sighup_cb, SIGHUP);
|
||||
ev_signal_start(loop, &sighup_w);
|
||||
|
||||
while (!do_shutdown) {
|
||||
if (do_reload) {
|
||||
do_reload = 0;
|
||||
reload();
|
||||
}
|
||||
pause();
|
||||
ev_signal_init(&sigterm_w, sigterm_cb, SIGTERM);
|
||||
ev_signal_start(loop, &sigterm_w);
|
||||
|
||||
ev_signal_init(&sigint_w, sigterm_cb, SIGINT);
|
||||
ev_signal_start(loop, &sigint_w);
|
||||
|
||||
/* Retry timer — one-shot, started only on backend failure */
|
||||
ev_timer_init(&retry_w, retry_cb, 0., 0.);
|
||||
|
||||
/* Watch conf.d for changes so we don't rely solely on signals */
|
||||
mkdir(CONF_DIR, 0755);
|
||||
ifd = inotify_init1(IN_CLOEXEC | IN_NONBLOCK);
|
||||
if (ifd < 0) {
|
||||
ERROR("inotify_init1: %s, falling back to signals only", strerror(errno));
|
||||
} else if (inotify_add_watch(ifd, CONF_DIR,
|
||||
IN_CLOSE_WRITE | IN_DELETE |
|
||||
IN_MOVED_TO | IN_MOVED_FROM) < 0) {
|
||||
ERROR("inotify_add_watch %s: %s", CONF_DIR, strerror(errno));
|
||||
close(ifd);
|
||||
ifd = -1;
|
||||
} else {
|
||||
ev_io_init(&inotify_w, inotify_cb, ifd, EV_READ);
|
||||
ev_io_start(loop, &inotify_w);
|
||||
}
|
||||
|
||||
/* Initial load */
|
||||
reload(loop);
|
||||
|
||||
ev_run(loop, 0);
|
||||
|
||||
INFO("shutting down");
|
||||
|
||||
if (ifd >= 0)
|
||||
close(ifd);
|
||||
route_list_free(&active_routes);
|
||||
rip_config_free(&active_rip);
|
||||
backend_cleanup();
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ extern int debug;
|
||||
#define INFO(fmt, args...) LOG(LOG_INFO, fmt, ##args)
|
||||
#define DEBUG(fmt, args...) do { if (debug) LOG(LOG_DEBUG, fmt, ##args); } while (0)
|
||||
|
||||
#define CONF_DIR "/etc/netd/conf.d"
|
||||
#define CONF_DIR "/etc/net.d"
|
||||
|
||||
/* Nexthop types */
|
||||
enum nh_type {
|
||||
|
||||
Reference in New Issue
Block a user