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)
This commit is contained in:
Yu Watanabe 2023-09-04 16:51:25 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent ae5445a059
commit 9dec95c8c5
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: