Skip to content

Commit

Permalink
IPv4LL: If we are not configuring, abort if address does not exist
Browse files Browse the repository at this point in the history
Fixes a segfault as we would not add the address and we would
expect to find it.
  • Loading branch information
rsmarples committed Aug 1, 2024
1 parent 5ac1235 commit c6a8fa1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ipv4ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,13 @@ ipv4ll_start(void *arg)
#ifdef IN_IFF_DUPLICATED
loginfox("%s: using IPv4LL address %s", ifp->name, ia->saddr);
#endif
} else {
} else if (ifp->options->options & DHCPCD_CONFIGURE) {
loginfox("%s: probing for an IPv4LL address", ifp->name);
if (repick || state->pickedaddr.s_addr == INADDR_ANY)
ipv4ll_pickaddr(ifp);
} else {
logwarnx("%s: refusing to configure IPv4LL", ifp->name);
return;
}

ipv4ll_start_arp(ifp);
Expand Down

0 comments on commit c6a8fa1

Please sign in to comment.