1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-21 18:03:41 +03:00

sd-ndisc,sd-radv: fix use of uninitialized value

When icmp6_receive() fails, then the source address is not initialized yet.

(cherry picked from commit 4674f407b2a96baaed4c8226342bccb313463717)
(cherry picked from commit 9dec95c8c50dc0057454363affe02b9114d14055)
(cherry picked from commit 9f545c1aead5c20111e8c06d17b25792a98be596)
This commit is contained in:
Yu Watanabe 2023-09-04 16:51:25 +09:00 committed by Luca Boccassi
parent 11d5deb7d3
commit 4efd9743f9
2 changed files with 2 additions and 4 deletions

View File

@ -227,8 +227,7 @@ static int ndisc_recv(sd_event_source *s, int fd, uint32_t revents, void *userda
switch (r) {
case -EADDRNOTAVAIL:
log_ndisc(nd, "Received RA from non-link-local address %s. Ignoring.",
IN6_ADDR_TO_STRING(&rt->address));
log_ndisc(nd, "Received RA from non-link-local address. Ignoring.");
break;
case -EMULTIHOP:

View File

@ -271,8 +271,7 @@ static int radv_recv(sd_event_source *s, int fd, uint32_t revents, void *userdat
switch (r) {
case -EADDRNOTAVAIL:
log_radv(ra, "Received RS from non-link-local address %s. Ignoring",
IN6_ADDR_TO_STRING(&src));
log_radv(ra, "Received RS from non-link-local address. Ignoring");
break;
case -EMULTIHOP: