]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network/ndisc: sd_ndisc_router_get_{icmp6_ratelimit,retransmission_time}() should... 31245/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 7 Feb 2024 21:11:23 +0000 (06:11 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 7 Feb 2024 21:24:31 +0000 (06:24 +0900)
This also fixes use of '%m' specifier without passign error code.

src/network/networkd-ndisc.c

index 13b09e997898444c57605b5d93d5399f5d5f7a03..50ee376223157dd89adad1d31b99ab3b877c08ef 100644 (file)
@@ -372,10 +372,8 @@ static int ndisc_router_process_icmp6_ratelimit(Link *link, sd_ndisc_router *rt)
                 return 0;
 
         r = sd_ndisc_router_get_icmp6_ratelimit(rt, &icmp6_ratelimit);
-        if (r < 0) {
-                log_link_debug(link, "Failed to get ICMP6 ratelimit from RA, ignoring: %m");
-                return 0;
-        }
+        if (r < 0)
+                return log_link_warning_errno(link, r, "Failed to get ICMP6 ratelimit from RA: %m");
 
         /* We do not allow 0 here. */
         if (!timestamp_is_set(icmp6_ratelimit))
@@ -406,10 +404,8 @@ static int ndisc_router_process_retransmission_time(Link *link, sd_ndisc_router
                 return 0;
 
         r = sd_ndisc_router_get_retransmission_time(rt, &retrans_time);
-        if (r < 0) {
-                log_link_debug_errno(link, r, "Failed to get retransmission time from RA, ignoring: %m");
-                return 0;
-        }
+        if (r < 0)
+                return log_link_warning_errno(link, r, "Failed to get retransmission time from RA: %m");
 
         /* 0 is the unspecified value and must not be set (see RFC4861, 6.3.4) */
         if (!timestamp_is_set(retrans_time))