From c6a8fa1e6a68e46e89fef0f953f4c7bf4915e257 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 1 Aug 2024 17:06:51 +0100 Subject: [PATCH] IPv4LL: If we are not configuring, abort if address does not exist Fixes a segfault as we would not add the address and we would expect to find it. --- src/ipv4ll.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ipv4ll.c b/src/ipv4ll.c index 43974a80..5b2c48bb 100644 --- a/src/ipv4ll.c +++ b/src/ipv4ll.c @@ -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);