]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: update comment and log message
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 26 Apr 2021 00:03:33 +0000 (09:03 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 26 Apr 2021 09:08:41 +0000 (10:08 +0100)
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.

src/network/networkd-link.c

index a46aa5b9c333776c450dd24bd427fed9a508f2f9..63f31b72010ec73871f6d5f2de7fee5f95da9b17 100644 (file)
@@ -1327,8 +1327,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