Skip to content

Commit 9dec95c

Browse files
yuwatakeszybz
authored andcommitted
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 4674f40)
1 parent ae5445a commit 9dec95c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/libsystemd-network/sd-ndisc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,7 @@ static int ndisc_recv(sd_event_source *s, int fd, uint32_t revents, void *userda
227227

228228
switch (r) {
229229
case -EADDRNOTAVAIL:
230-
log_ndisc(nd, "Received RA from non-link-local address %s. Ignoring.",
231-
IN6_ADDR_TO_STRING(&rt->address));
230+
log_ndisc(nd, "Received RA from non-link-local address. Ignoring.");
232231
break;
233232

234233
case -EMULTIHOP:

src/libsystemd-network/sd-radv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,7 @@ static int radv_recv(sd_event_source *s, int fd, uint32_t revents, void *userdat
271271

272272
switch (r) {
273273
case -EADDRNOTAVAIL:
274-
log_radv(ra, "Received RS from non-link-local address %s. Ignoring",
275-
IN6_ADDR_TO_STRING(&src));
274+
log_radv(ra, "Received RS from non-link-local address. Ignoring");
276275
break;
277276

278277
case -EMULTIHOP:

0 commit comments

Comments
 (0)