public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Yi Zhao" <yi.zhao@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] busybox: sysctl: ignore EIO of stable_secret below /proc/sys/net/ipv6/conf
Date: Sat, 4 Apr 2020 17:11:08 +0800	[thread overview]
Message-ID: <20200404091108.28857-1-yi.zhao@windriver.com> (raw)

Avoid confusing messages caused by EIO on reading
/proc/sys/net/ipv6/conf/*/stable_secret if those are not set yet.
Make it behave the same as procps(>=3.3.13).

Fixes:
$ sysctl -a | grep ipv6.conf | grep stable_secret
sysctl: error reading key 'net.ipv6.conf.all.stable_secret': Input/output error
sysctl: error reading key 'net.ipv6.conf.default.stable_secret': Input/output error
sysctl: error reading key 'net.ipv6.conf.eth0.stable_secret': Input/output error
sysctl: error reading key 'net.ipv6.conf.lo.stable_secret': Input/output error

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 ...O-of-stable_secret-below-proc-sys-ne.patch | 40 +++++++++++++++++++
 meta/recipes-core/busybox/busybox_1.31.1.bb   |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 meta/recipes-core/busybox/busybox/0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch

diff --git a/meta/recipes-core/busybox/busybox/0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch b/meta/recipes-core/busybox/busybox/0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch
new file mode 100644
index 0000000000..9f58eaef67
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch
@@ -0,0 +1,40 @@
+From 3bee0460d74bad88eca6592e63ca926961b43b67 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Fri, 6 Mar 2020 16:09:26 +0800
+Subject: [PATCH] sysctl: ignore EIO of stable_secret below
+ /proc/sys/net/ipv6/conf
+
+Avoid confusing messages caused by EIO on reading
+/proc/sys/net/ipv6/conf/*/stable_secret if those are not set yet.
+Make it behave the same as procps(>=3.3.13).
+
+Upstream-Status: Submitted [busybox@busybox.net mailing list]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ procps/sysctl.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/procps/sysctl.c b/procps/sysctl.c
+index 6d77185ca..42c51cc91 100644
+--- a/procps/sysctl.c
++++ b/procps/sysctl.c
+@@ -202,7 +202,14 @@ static int sysctl_act_on_setting(char *setting)
+ 		value = cptr = xmalloc_read(fd, NULL);
+ 		close(fd);
+ 		if (value == NULL) {
+-			bb_perror_msg("error reading key '%s'", outname);
++			switch (errno) {
++				case EIO:
++					/* Ignore stable_secret below /proc/sys/net/ipv6/conf */
++					break;
++				default:
++					bb_perror_msg("error reading key '%s'", outname);
++					break;
++			}
+ 			retval = EXIT_FAILURE;
+ 			goto end;
+ 		}
+-- 
+2.17.1
+
diff --git a/meta/recipes-core/busybox/busybox_1.31.1.bb b/meta/recipes-core/busybox/busybox_1.31.1.bb
index ec5b580442..2bb1d59ba7 100644
--- a/meta/recipes-core/busybox/busybox_1.31.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.31.1.bb
@@ -47,6 +47,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://0003-runsv-Use-64-prefix-syscall-if-we-have-to.patch \
            file://0001-Remove-syscall-wrappers-around-clock_gettime-closes-.patch \
            file://0001-Remove-stime-function-calls.patch \
+           file://0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch \
 "
 SRC_URI_append_libc-musl = " file://musl.cfg "
 
-- 
2.17.1


                 reply	other threads:[~2020-04-04  9:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200404091108.28857-1-yi.zhao@windriver.com \
    --to=yi.zhao@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox