* [Buildroot] [PATCH 0/2] bump smcroute + misc. fixups
@ 2021-09-28 9:43 Joachim Wiberg
2021-09-28 9:43 ` [Buildroot] [PATCH 1/2] package/smcroute: bump version to v2.5.3 Joachim Wiberg
2021-09-28 9:43 ` [Buildroot] [PATCH 2/2] package/smcroute: cross check PID with process name in stop action Joachim Wiberg
0 siblings, 2 replies; 4+ messages in thread
From: Joachim Wiberg @ 2021-09-28 9:43 UTC (permalink / raw)
To: buildroot; +Cc: Joachim Wiberg, Matt Weber
Hi everyone,
here's another update of SMCRoute, fixes issues reported by Debian,
e.g. a nasty problem with deleting routes over IPC.
https://github.com/troglobit/smcroute/releases/tag/2.5.3
Also included in this patch set is:
- a minor change to the start script, pointed out by Arnout earlier,
that verifies the PID and process name before attempting to kill the
daemon in stop
- a backported patch to remove annoying error messages in syslog
- kernel config fixup, same as mrouted package
Best regards
/Joachim
Joachim Wiberg (2):
package/smcroute: bump version to v2.5.3
package/smcroute: cross check PID with process name in stop action
...Avoid-trying-to-delete-inactive-VIFs.patch | 51 +++++++++++++++++++
package/smcroute/S41smcroute | 6 +--
package/smcroute/smcroute.hash | 6 +--
package/smcroute/smcroute.mk | 9 +++-
4 files changed, 64 insertions(+), 8 deletions(-)
create mode 100644 package/smcroute/0001-Avoid-trying-to-delete-inactive-VIFs.patch
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] package/smcroute: bump version to v2.5.3
2021-09-28 9:43 [Buildroot] [PATCH 0/2] bump smcroute + misc. fixups Joachim Wiberg
@ 2021-09-28 9:43 ` Joachim Wiberg
2021-09-28 9:43 ` [Buildroot] [PATCH 2/2] package/smcroute: cross check PID with process name in stop action Joachim Wiberg
1 sibling, 0 replies; 4+ messages in thread
From: Joachim Wiberg @ 2021-09-28 9:43 UTC (permalink / raw)
To: buildroot; +Cc: Joachim Wiberg, Matt Weber
- Upstream has .sha256 checksum files, drop redundant .md5 checksum
- Backport upstream patch to silence bogus error message for loopback
- SMCRoute is useless w/o kernel support, use same fixups as mrouted
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
---
...Avoid-trying-to-delete-inactive-VIFs.patch | 51 +++++++++++++++++++
package/smcroute/smcroute.hash | 6 +--
package/smcroute/smcroute.mk | 9 +++-
3 files changed, 62 insertions(+), 4 deletions(-)
create mode 100644 package/smcroute/0001-Avoid-trying-to-delete-inactive-VIFs.patch
diff --git a/package/smcroute/0001-Avoid-trying-to-delete-inactive-VIFs.patch b/package/smcroute/0001-Avoid-trying-to-delete-inactive-VIFs.patch
new file mode 100644
index 0000000000..07f49dffcf
--- /dev/null
+++ b/package/smcroute/0001-Avoid-trying-to-delete-inactive-VIFs.patch
@@ -0,0 +1,51 @@
+From 8ce1d117a31e35d97fb955b82edf13514267eaab Mon Sep 17 00:00:00 2001
+From: Joachim Wiberg <troglobit@gmail.com>
+Date: Tue, 28 Sep 2021 11:09:47 +0200
+Subject: [PATCH] Avoid trying to delete inactive VIFs
+Organization: Westermo Network Technologies AB
+
+When probing interfaces at startup, there's a check for IFF_MULTICAST,
+if this flag is not set we try to delete its corresponding VIF/MIF.
+This is for hanlding .conf reload scenarios where an interface has had
+its MULTICAST flag dropped.
+
+However, when starting up on Linux systems, the loopback interface has
+no MULTICAST flag set. This leads to the following bogus warning:
+
+ Failed deleting VIF for iface lo: Resource temporarily unavailable
+
+This patch makes sure to check if we have a registered kernel VIF/MIF
+for an interface before attempting to delete it.
+
+Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
+---
+ src/mroute.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/mroute.c b/src/mroute.c
+index 291e9c4..6a80a47 100644
+--- a/src/mroute.c
++++ b/src/mroute.c
+@@ -298,6 +298,9 @@ static int mroute4_del_vif(struct iface *iface)
+ if (iface->mrdisc)
+ rc = mrdisc_deregister(iface->vif);
+
++ if (iface->vif == ALL_VIFS)
++ return 0;
++
+ if (kern_vif_del(iface)) {
+ switch (errno) {
+ case ENOENT:
+@@ -910,6 +913,9 @@ static int mroute6_del_mif(struct iface *iface)
+ {
+ int rc = 0;
+
++ if (iface->mif == ALL_VIFS)
++ return 0;
++
+ if (kern_mif_del(iface) && errno != ENOENT) {
+ switch (errno) {
+ case ENOENT:
+--
+2.25.1
+
diff --git a/package/smcroute/smcroute.hash b/package/smcroute/smcroute.hash
index 62b72239cc..26d55adf88 100644
--- a/package/smcroute/smcroute.hash
+++ b/package/smcroute/smcroute.hash
@@ -1,6 +1,6 @@
-# Upstream .md5 and .sha256 from GitHub
-sha256 7eca88389cc08cbfe75f787e02ab32a390ef806555069a08abe8d7fa925ed094 smcroute-2.5.2.tar.gz
-md5 dc29e6bd3024a1ad3dd0f2d8c2aed16e smcroute-2.5.2.tar.gz
+# Upstream .sha256 from GitHub
+sha256 4342b95c99e410cab75e9ee80f20480e0170d8b07b8e31553ba1bec3e377fc56 smcroute-2.5.3.tar.gz
# Locally generated
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING
+sha256 d260ea4b9d4b01317568850c3271e3923b546ea4ad57c899e79434f1cc8bcf0b 0001-Avoid-trying-to-delete-inactive-VIFs.patch
diff --git a/package/smcroute/smcroute.mk b/package/smcroute/smcroute.mk
index e8fc54bb42..96da0dc346 100644
--- a/package/smcroute/smcroute.mk
+++ b/package/smcroute/smcroute.mk
@@ -4,7 +4,7 @@
#
################################################################################
-SMCROUTE_VERSION = 2.5.2
+SMCROUTE_VERSION = 2.5.3
SMCROUTE_SITE = https://github.com/troglobit/smcroute/releases/download/$(SMCROUTE_VERSION)
SMCROUTE_LICENSE = GPL-2.0+
SMCROUTE_LICENSE_FILES = COPYING
@@ -30,4 +30,11 @@ endef
SMCROUTE_POST_INSTALL_TARGET_HOOKS += SMCROUTE_PRUNE_COMPAT_SCRIPT
+# We will asume that CONFIG_NET and CONFIG_INET are already
+# set in the kernel configuration provided by the user.
+define MROUTED_LINUX_CONFIG_FIXUPS
+ $(call KCONFIG_ENABLE_OPT,CONFIG_IP_MULTICAST)
+ $(call KCONFIG_ENABLE_OPT,CONFIG_IP_MROUTE)
+endef
+
$(eval $(autotools-package))
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] package/smcroute: cross check PID with process name in stop action
2021-09-28 9:43 [Buildroot] [PATCH 0/2] bump smcroute + misc. fixups Joachim Wiberg
2021-09-28 9:43 ` [Buildroot] [PATCH 1/2] package/smcroute: bump version to v2.5.3 Joachim Wiberg
@ 2021-09-28 9:43 ` Joachim Wiberg
2021-10-06 19:29 ` Arnout Vandecappelle
1 sibling, 1 reply; 4+ messages in thread
From: Joachim Wiberg @ 2021-09-28 9:43 UTC (permalink / raw)
To: buildroot; +Cc: Joachim Wiberg, Matt Weber
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
---
package/smcroute/S41smcroute | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/package/smcroute/S41smcroute b/package/smcroute/S41smcroute
index bdc0f87645..3bef3bcd85 100755
--- a/package/smcroute/S41smcroute
+++ b/package/smcroute/S41smcroute
@@ -4,12 +4,11 @@ NAME="smcroute"
DAEMON="smcrouted"
PIDFILE="/var/run/$NAME.pid"
-# shellcheck source=/dev/null
[ -r "/etc/default/$NAME" ] && . "/etc/default/$NAME"
cmd()
{
- start-stop-daemon -q -p "$PIDFILE" "$@"
+ start-stop-daemon -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" "$@"
status=$?
if [ $status -eq 0 ]; then
echo "OK"
@@ -22,8 +21,7 @@ cmd()
case "$1" in
start)
printf 'Starting %s: ' "$DAEMON"
- # shellcheck disable=SC2086 # we need the word splitting
- cmd -S -x "/usr/sbin/$DAEMON" -- $SMCROUTED_ARGS
+ cmd -S -- $SMCROUTED_ARGS
;;
stop)
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/smcroute: cross check PID with process name in stop action
2021-09-28 9:43 ` [Buildroot] [PATCH 2/2] package/smcroute: cross check PID with process name in stop action Joachim Wiberg
@ 2021-10-06 19:29 ` Arnout Vandecappelle
0 siblings, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2021-10-06 19:29 UTC (permalink / raw)
To: Joachim Wiberg, buildroot; +Cc: Matt Weber
On 28/09/2021 11:43, Joachim Wiberg wrote:
> Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
> ---
> package/smcroute/S41smcroute | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/package/smcroute/S41smcroute b/package/smcroute/S41smcroute
> index bdc0f87645..3bef3bcd85 100755
> --- a/package/smcroute/S41smcroute
> +++ b/package/smcroute/S41smcroute
> @@ -4,12 +4,11 @@ NAME="smcroute"
> DAEMON="smcrouted"
> PIDFILE="/var/run/$NAME.pid"
>
> -# shellcheck source=/dev/null
There's no reason to remove this shellcheck exception, right?
> [ -r "/etc/default/$NAME" ] && . "/etc/default/$NAME"
>
> cmd()
> {
> - start-stop-daemon -q -p "$PIDFILE" "$@"
> + start-stop-daemon -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" "$@"
> status=$?
> if [ $status -eq 0 ]; then
> echo "OK"
> @@ -22,8 +21,7 @@ cmd()
> case "$1" in
> start)
> printf 'Starting %s: ' "$DAEMON"
> - # shellcheck disable=SC2086 # we need the word splitting
Nor here.
Applied both to master with those two fixed, thanks.
Regards,
Arnout
> - cmd -S -x "/usr/sbin/$DAEMON" -- $SMCROUTED_ARGS
> + cmd -S -- $SMCROUTED_ARGS
> ;;
>
> stop)
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-06 19:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 9:43 [Buildroot] [PATCH 0/2] bump smcroute + misc. fixups Joachim Wiberg
2021-09-28 9:43 ` [Buildroot] [PATCH 1/2] package/smcroute: bump version to v2.5.3 Joachim Wiberg
2021-09-28 9:43 ` [Buildroot] [PATCH 2/2] package/smcroute: cross check PID with process name in stop action Joachim Wiberg
2021-10-06 19:29 ` Arnout Vandecappelle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.