mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 18:55:40 +03:00
Merge pull request #10252 from poettering/recv-log-msg-bump
tiny sd-ravd/sd-ndisc logging fixes
This commit is contained in:
commit
0f0159e313
3
TODO
3
TODO
@ -17,6 +17,9 @@ Janitorial Clean-ups:
|
||||
|
||||
Features:
|
||||
|
||||
* consider splitting out all temporary file creation APIs (we have so many in
|
||||
fileio.h and elsewhere!) into a new util file of its own.
|
||||
|
||||
* set memory.oom.group in cgroupsv2 for all leaf cgroups
|
||||
|
||||
* whenever oom_kill memory.event event is triggered print a nice log message
|
||||
|
@ -85,5 +85,4 @@ struct sd_radv_prefix {
|
||||
|
||||
#define log_radv_full(level, error, fmt, ...) log_internal(level, error, __FILE__, __LINE__, __func__, "RADV: " fmt, ##__VA_ARGS__)
|
||||
#define log_radv_errno(error, fmt, ...) log_radv_full(LOG_DEBUG, error, fmt, ##__VA_ARGS__)
|
||||
#define log_radv_warning_errno(error, fmt, ...) log_radv_full(LOG_WARNING, error, fmt, ##__VA_ARGS__)
|
||||
#define log_radv(fmt, ...) log_radv_errno(0, fmt, ##__VA_ARGS__)
|
||||
|
@ -221,7 +221,14 @@ static int ndisc_recv(sd_event_source *s, int fd, uint32_t revents, void *userda
|
||||
break;
|
||||
|
||||
case -EPFNOSUPPORT:
|
||||
log_ndisc("Received invalid source address from ICMPv6 socket.");
|
||||
log_ndisc("Received invalid source address from ICMPv6 socket. Ignoring.");
|
||||
break;
|
||||
|
||||
case -EAGAIN: /* ignore spurious wakeups */
|
||||
break;
|
||||
|
||||
default:
|
||||
log_ndisc_errno(r, "Unexpected error while reading from ICMPv6, ignoring: %m");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -249,8 +249,11 @@ static int radv_recv(sd_event_source *s, int fd, uint32_t revents, void *userdat
|
||||
log_radv("Received invalid source address from ICMPv6 socket. Ignoring.");
|
||||
break;
|
||||
|
||||
case -EAGAIN: /* ignore spurious wakeups */
|
||||
break;
|
||||
|
||||
default:
|
||||
log_radv_warning_errno(r, "Error receiving from ICMPv6 socket: %m");
|
||||
log_radv_errno(r, "Unexpected error receiving from ICMPv6 socket: %m");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -261,7 +264,7 @@ static int radv_recv(sd_event_source *s, int fd, uint32_t revents, void *userdat
|
||||
|
||||
r = radv_send(ra, &src, ra->lifetime);
|
||||
if (r < 0)
|
||||
log_radv_warning_errno(r, "Unable to send solicited Router Advertisement to %s: %m", addr);
|
||||
log_radv_errno(r, "Unable to send solicited Router Advertisement to %s: %m", addr);
|
||||
else
|
||||
log_radv("Sent solicited Router Advertisement to %s", addr);
|
||||
|
||||
@ -294,7 +297,7 @@ static int radv_timeout(sd_event_source *s, uint64_t usec, void *userdata) {
|
||||
|
||||
r = radv_send(ra, NULL, ra->lifetime);
|
||||
if (r < 0)
|
||||
log_radv_warning_errno(r, "Unable to send Router Advertisement: %m");
|
||||
log_radv_errno(r, "Unable to send Router Advertisement: %m");
|
||||
|
||||
/* RFC 4861, Section 6.2.4, sending initial Router Advertisements */
|
||||
if (ra->ra_sent < SD_RADV_MAX_INITIAL_RTR_ADVERTISEMENTS) {
|
||||
@ -348,7 +351,7 @@ _public_ int sd_radv_stop(sd_radv *ra) {
|
||||
with zero lifetime */
|
||||
r = radv_send(ra, NULL, 0);
|
||||
if (r < 0)
|
||||
log_radv_warning_errno(r, "Unable to send last Router Advertisement with router lifetime set to zero: %m");
|
||||
log_radv_errno(r, "Unable to send last Router Advertisement with router lifetime set to zero: %m");
|
||||
|
||||
radv_reset(ra);
|
||||
ra->fd = safe_close(ra->fd);
|
||||
|
Loading…
Reference in New Issue
Block a user