diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-04-26 09:03:33 +0900 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-05-15 19:46:56 +0200 |
commit | 0d80d62a87862f46f62c6c17ad6d682ad6228049 (patch) | |
tree | d21cfcb29d3cbbdd718f0aa215015825900d486d | |
parent | 42a2588608242bc9b4a9e9bc4a4b758050473196 (diff) | |
download | systemd-0d80d62a87862f46f62c6c17ad6d682ad6228049.tar.gz |
network: update comment and log message
After 4b30f2e135ee84041bb597edca7225858f4ef4fb, reading stable_secret
sysctl property fails with -ENOMEM, instead of -EIO.
This is due to read_full_virtual_file() uses read() as the backend while
read_one_line_file() uses fgetc(). And each functions return different
error on fails.
Anyway, the failure is harmless here. So, the log message and comment is
updated.
Closes one of the issues in #19410.
(cherry picked from commit 0e27527170aa0179f2a4b3b55b78ddc049f815b9)
(cherry picked from commit 2417e9b59aa654e4b3def3399576ebbc2cdd7c95)
-rw-r--r-- | src/network/networkd-link.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index db203b9b9e..524bd6842a 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1345,8 +1345,9 @@ static int link_configure_addrgen_mode(Link *link) { r = sysctl_read_ip_property(AF_INET6, link->ifname, "stable_secret", NULL); if (r < 0) { /* The file may not exist. And even if it exists, when stable_secret is unset, - * reading the file fails with EIO. */ - log_link_debug_errno(link, r, "Failed to read sysctl property stable_secret: %m"); + * reading the file fails with ENOMEM when read_full_virtual_file(), which uses + * read() as the backend, and EIO when read_one_line_file() which uses fgetc(). */ + log_link_debug_errno(link, r, "Failed to read sysctl property stable_secret, ignoring: %m"); ipv6ll_mode = IN6_ADDR_GEN_MODE_EUI64; } else |