sd-ndisc,sd-radv: fix use of uninitialized value
When icmp6_receive() fails, then the source address is not initialized yet.
This commit is contained in:
@@ -225,8 +225,7 @@ static int ndisc_recv(sd_event_source *s, int fd, uint32_t revents, void *userda
|
||||
if (r < 0)
|
||||
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.");
|
||||
return 0;
|
||||
|
||||
case -EMULTIHOP:
|
||||
|
||||
@@ -264,8 +264,7 @@ static int radv_recv(sd_event_source *s, int fd, uint32_t revents, void *userdat
|
||||
if (r < 0)
|
||||
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");
|
||||
return 0;
|
||||
|
||||
case -EMULTIHOP:
|
||||
|
||||
Reference in New Issue
Block a user